Date: Sun, 22 Jan 2017 12:46:32 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 216229] head: (e.g. -r312009): kernel-toolchain: bootstrap-tools stage libllvmminimal can fail for lack of -I options (e.g., from scratch kernel-toolchain) Message-ID: <bug-216229-29464-pHEaZsMnYn@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-216229-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-216229-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216229 Dimitry Andric <dim@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dim@FreeBSD.org Assignee|freebsd-toolchain@FreeBSD.o |dim@FreeBSD.org |rg | Status|New |In Progress --- Comment #1 from Dimitry Andric <dim@FreeBSD.org> --- (In reply to Mark Millard from comment #0) > So the lines from /usr/src/lib/clang/llvm.build.mk for CFLAGS: >=20 > 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}\" >=20 > do not contribute to the C++ compiles for libllvmminimal. This is incorrect: in share/mk/sys.mk, CXXFLAGS are derived from CFLAGS, wi= th the following rule: CXXFLAGS ?=3D=20=20=20=20=20 ${CFLAGS:N-std=3D*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-W= old-style-definition} E.g. -std flags and some others are filtered out. > The lack of -I definitions for C++ ends up with build failures > such as below (from a first-time kernel-toolchain example): I have seen such failures before, and they were almost always caused by set= ting CFLAGS or CXXFLAGS incorrectly in /etc/make.conf, e.g. doing: CFLAGS=3D -DFOO CXXFLAGS=3D -DBAR while one should use the +=3D operator instead, e.g.: CFLAGS+=3D -DFOO CXXFLAGS+=3D -DBAR Can you please post your make.conf? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216229-29464-pHEaZsMnYn>