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=216229 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: > > 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. This is incorrect: in share/mk/sys.mk, CXXFLAGS are derived from CFLAGS, with the following rule: CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-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 setting CFLAGS or CXXFLAGS incorrectly in /etc/make.conf, e.g. doing: CFLAGS= -DFOO CXXFLAGS= -DBAR while one should use the += operator instead, e.g.: CFLAGS+= -DFOO CXXFLAGS+= -DBAR Can you please post your make.conf? -- 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>
