From owner-freebsd-ppc@freebsd.org Wed Jan 18 12:00:56 2017 Return-Path: Delivered-To: freebsd-ppc@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 9ACDCCB5A8A for ; Wed, 18 Jan 2017 12:00:56 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-10.reflexion.net [208.70.210.10]) (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 4FF491392 for ; Wed, 18 Jan 2017 12:00:55 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 10910 invoked from network); 18 Jan 2017 12:02:22 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 18 Jan 2017 12:02:22 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.1) with SMTP; Wed, 18 Jan 2017 07:00:49 -0500 (EST) Received: (qmail 22378 invoked from network); 18 Jan 2017 12:00:49 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 18 Jan 2017 12:00:49 -0000 Received: from [192.168.1.111] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 9BDCCEC9092; Wed, 18 Jan 2017 04:00:48 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) 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> Date: Wed, 18 Jan 2017 04:00:47 -0800 To: FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 12:00:56 -0000 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