powerpc64-gcc unable to compile clang 3.8.0 from clang380-import -r294609 via buildworld

Mark Millard markmi at dsl-only.net
Sat Jan 23 11:25:56 UTC 2016


I tried a buildworld that included building clang and lldb based on using powerpc64-xtoolchain-gcc/powerpc64-gcc as a cross compiler. It failed, see below. This might indicate a more general gcc 5.x vs. clang 3.8.0 source code mismatch. This was my first try. This could have been true for some time.

--- CFG.o ---
/usr/local/bin/powerpc64-portbld-freebsd11.0-g++ -isystem /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include -L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib --sysroot=/usr/obj/xtoolchain/powerpc.po
werpc64/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/ -I/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1 -std=gnu++11 -L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/../lib/libc++ --sysroot=/usr
/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/  -O2 -pipe -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/include -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm
/tools/clang/include -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis -I. -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"powerpc64-unknown-freebsd11.0\" -DLLVM_HOST_TRIPLE=\"powerpc64
-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" -MD -MP -MF.depend.CFG.o -MTCFG.o -fstack-protector-strong -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-
error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict
-aliasing -Wno-error=address  -std=c++11 -fno-exceptions -fno-rtti  -c /usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp -o CFG.o
. . .
--- all_subdir_libclanganalysis ---
/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp: In member function 'std::__1::unique_ptr<clang::CFG> {anonymous}::CFGBuilder::buildCFG(const clang::Decl*, clang::Stmt*)':
/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp:1046:45: error: no matching function for call to 'reverse(clang::CXXConstructorDecl::init_const_range)'
     for (auto *I : llvm::reverse(CD->inits())) {
                                             ^

(not the only error reported for CFG.cpp’s compile, I just listed the first).

I do not know if the -std=gnu++11 that is automatically used is causing variations in the language definition in use or not.



I do this sort of thing with 11.0-CURRENT now and have been for a long time, including building clang 3.7.1 and its lldb via powerpc64-gcc in more recent times. But powerpc64-gcc has historically rejected the clang extras so I’ve used WITHOUT_CLANG_EXTRAS= historically.



Some context notes:

Empty make.conf via __MAKE_CONF use.

scr.conf:
(actually: used via SRC_ENV_CONF=)

TO_TYPE=powerpc64
TOOLS_TO_TYPE=${TO_TYPE}
FROM_TYPE=amd64
TOOLS_FROM_TYPE=x86_64
VERSION_CONTEXT=11.0
#
KERNCONF=GENERIC64vtsc-NODEBUG
TARGET=powerpc
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITHOUT_CROSS_COMPILER=
#
# 1 thing that fails to build if attempted via gcc variants:
WITHOUT_CLANG_EXTRAS=
#
WITH_FAST_DEPEND=
WITH_LIBCPLUSPLUS=
WITH_LIB32=
WITH_BOOT=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_LLDB=
#
WITHOUT_GCC=
WITHOUT_GNUCXX=
#
NO_WERROR=
MALLOC_PRODUCTION=
#CFLAGS+= -DELF_VERBOSE
#
WITH_DEBUG=
WITH_DEBUG_FILES=
#
# TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related bintutils...
#
CROSS_TOOLCHAIN=${TO_TYPE}-gcc
X_COMPILER_TYPE=gcc
CROSS_BINUTILS_PREFIX=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/
#
.if ${.MAKE.LEVEL} == 0
XCC=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gcc
XCXX=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g++
XCPP=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-cpp
.export XCC
.export XCXX
.export XCPP
XAS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as
XAR=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar
XLD=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld
XNM=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm
XOBJCOPY=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy
XOBJDUMP=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump
XRANLIB=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib
XSIZE=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size
#NO-SUCH: XSTRINGS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings
XSTRINGS=/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings
.export XAS
.export XAR
.export XLD
.export XNM
.export XOBJCOPY
.export XOBJDUMP
.export XRANLIB
.export XSIZE
.export XSTRINGS
.endif
#
# From clang (via system)...
#
.if ${.MAKE.LEVEL} == 0
CC=/usr/bin/clang -B/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin
CXX=/usr/bin/clang++ -B/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin
CPP=/usr/bin/clang-cpp -B/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin
.export CC
.export CXX
.export CPP
.endif
#
# TOOLS_FROM_TYPE binutils...
#
.if ${.MAKE.LEVEL} == 0
AS=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/as
AR=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/ar
LD=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/ld
NM=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/nm
OBJCOPY=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/objcopy
OBJDUMP=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/objdump
RANLIB=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/ranlib
SIZE=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/size
#NO-SUCH: STRINGS=/usr/local/${TOOLS_FROM_TYPE}-freebsd/bin/strings
STRINGS=/usr/local/bin/${TOOLS_FROM_TYPE}-freebsd-strings
.export AS
.export AR
.export LD
.export NM
.export OBJCOPY
.export OBJDUMP
.export RANLIB
.export SIZE
.export STRINGS
.endif



===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-ppc mailing list