Date: Wed, 18 Jan 2017 04:00:47 -0800 From: Mark Millard <markmi@dsl-only.net> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Bug 216229 - head: (e.g. -r312009): kernel-toolchain: bootstrap-tools stage libllvmminimal can fail for lack of -I options Message-ID: <395F73EA-4544-4239-861F-7EF8386A419D@dsl-only.net>
next in thread | raw e-mail | index | archive | help
I have reported the following as bugzilla 216229. . . [powerpc64 may not be essential but it is the environment I found this in.] Background information: libllvmminimal has C++ code, not (just) C code. [Note that CFLAGS has things like -std=3Dgnu99 that are not appropriate = to c++ (clang++).] So the lines from /usr/src/lib/clang/llvm.build.mk for CFLAGS: CFLAGS+=3D -I${SRCTOP}/lib/clang/include CFLAGS+=3D -I${LLVM_SRCS}/include CFLAGS+=3D -DLLVM_ON_UNIX CFLAGS+=3D -DLLVM_ON_FREEBSD CFLAGS+=3D -D__STDC_LIMIT_MACROS CFLAGS+=3D -D__STDC_CONSTANT_MACROS #CFLAGS+=3D -DNDEBUG . . . CFLAGS+=3D -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"${TARGET_TRIPLE}\" CFLAGS+=3D -DLLVM_HOST_TRIPLE=3D\"${BUILD_TRIPLE}\" CFLAGS+=3D -DDEFAULT_SYSROOT=3D\"${TOOLS_PREFIX}\" do not contribute to the C++ compiles for libllvmminimal. (See the later meta file content from such a failure: no -I options at all.) Thus unless the system compiler is in use so that no bootstrap compiler is to be built. . . The lack of -I definitions for C++ ends up with build failures such as below (from a first-time kernel-toolchain example): (this was a on-powerpc64, targeting powerpc64, example, not a cross-build) # Meta data file = /usr/obj/powerpc64vtsc_clang_altbinutils_kernel/powerpc.powerpc64/usr/src/= tmp/usr/src/lib/clang/libllvmminimal/_usr_obj_powerpc64vtsc_clang_altbinut= ils_kernel_powerpc.powerpc64_usr_src_tmp_usr_src_lib_clang_libllvmminimal_= Support_APInt.o.meta CMD clang++ -B/usr/local/powerpc64-freebsd/bin/ -std=3Dc++11 = -fno-exceptions -fno-rtti -stdlib=3Dlibc++ -Wno-c++11-extensions -c = /usr/src/contrib/llvm/lib/Support/APInt.cpp -o Support/APInt.o CWD = /usr/obj/powerpc64vtsc_clang_altbinutils_kernel/powerpc.powerpc64/usr/src/= tmp/usr/src/lib/clang/libllvmminimal TARGET Support/APInt.o -- command output -- /usr/src/contrib/llvm/lib/Support/APInt.cpp:15:10: fatal error: = 'llvm/ADT/APInt.h' file not found #include "llvm/ADT/APInt.h" ^ 1 error generated. *** Error code 1 libllvmminimal is not necessarily the only problem but it is the first = one and it is very early (bootstrap-tools stage). -I is not necessarily the only compile option type that is missing for libllvmminimal. [Note: I've a couple of poudriere-devel submittals that may actually = trace back to such issues --so poudriere might not be essential to the actual = issue.] =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?395F73EA-4544-4239-861F-7EF8386A419D>