https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216229
Bug ID: 216229 Summary: head: (e.g. -r312009): kernel-toolchain: bootstrap-tools stage libllvmminimal can fail for lack of -I options (e.g., from scratch kernel-toolchain) Product: Base System Version: CURRENT Hardware: powerpc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: mar...@dsl-only.net [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=gnu99 that are not appropriate to c++ (clang++).] So the lines from /usr/src/lib/clang/llvm.build.mk for CFLAGS: CFLAGS+= -I${SRCTOP}/lib/clang/include CFLAGS+= -I${LLVM_SRCS}/include CFLAGS+= -DLLVM_ON_UNIX CFLAGS+= -DLLVM_ON_FREEBSD CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -D__STDC_CONSTANT_MACROS #CFLAGS+= -DNDEBUG . . . CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" CFLAGS+= -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" do not contribute to the C++ compiles for libllvmminimal. 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_altbinutils_kernel_powerpc.powerpc64_usr_src_tmp_usr_src_lib_clang_libllvmminimal_Support_APInt.o.meta CMD clang++ -B/usr/local/powerpc64-freebsd/bin/ -std=c++11 -fno-exceptions -fno-rtti -stdlib=libc++ -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 actualyl trace back to such issues --so poudriere might not be essential to the actual issue.] -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"