From owner-freebsd-toolchain@freebsd.org Sun Jan 22 12:46:32 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8434CB06C2 for ; Sun, 22 Jan 2017 12:46:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CDC726E for ; Sun, 22 Jan 2017 12:46:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0MCkWwk021586 for ; Sun, 22 Jan 2017 12:46:32 GMT (envelope-from bugzilla-noreply@freebsd.org) 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) Date: Sun, 22 Jan 2017 12:46:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: dim@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2017 12:46:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216229 Dimitry Andric 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 --- (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.=