From owner-freebsd-toolchain@freebsd.org Thu Mar 31 23:42:51 2016 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 2CC5EAE4AE1 for ; Thu, 31 Mar 2016 23:42:51 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-157.reflexion.net [208.70.211.157]) (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 E0C371E63 for ; Thu, 31 Mar 2016 23:42:50 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 26951 invoked from network); 31 Mar 2016 23:42:46 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 31 Mar 2016 23:42:46 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.90.1) with SMTP; Thu, 31 Mar 2016 19:42:52 -0400 (EDT) Received: (qmail 8083 invoked from network); 31 Mar 2016 23:42:52 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 31 Mar 2016 23:42:52 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id E758B1C4078; Thu, 31 Mar 2016 16:42:42 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r297435 - head: still problems for stage 3 when gcc 4.2.1 is avoided (powerpc64 self-hosted build) From: Mark Millard In-Reply-To: <56FDA5F9.1090601@FreeBSD.org> Date: Thu, 31 Mar 2016 16:42:47 -0700 Cc: FreeBSD Current , FreeBSD Toolchain , FreeBSD PowerPC ML , Gerald Pfeifer , Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <481DA341-0DFC-4AF1-AD4D-56C5388FA8E3@dsl-only.net> References: <5A0ACA76-6F1D-4975-9E59-2A64BB8EFC77@dsl-only.net> <56FD9757.6040709@FreeBSD.org> <9E3033D5-F416-4B78-97C2-0A0AABF5A49E@dsl-only.net> <56FDA5F9.1090601@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 23:42:51 -0000 On 2016-Mar-31, at 3:34 PM, Bryan Drewery = wrote: > #include "..." search starts here: > #include <...> search starts here: > /usr/local/lib/gcc49/include/c++/ > /usr/local/lib/gcc49/include/c++//x86_64-portbld-freebsd11.0 > /usr/local/lib/gcc49/include/c++//backward > /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include > /usr/local/include > = /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed > /usr/include > End of search list. Beyond /usr/local/include is also the fun of [ignoring C++ specific = issues]: (My quoting of a copy/paste) > # ls = /usr/local/lib/gcc49/gcc/powerpc64-portbld-freebsd11.0/4.9.4/include* > /usr/local/lib/gcc49/gcc/powerpc64-portbld-freebsd11.0/4.9.4/include: > altivec.h iso646.h ppc-asm.h = spu2vmx.h stdatomic.h stdint-gcc.h = unwind.h > float.h objc ppu_intrinsics.h = ssp stdbool.h stdint.h = varargs.h > htmintrin.h omp.h si2vmx.h = stdalign.h stddef.h stdnoreturn.h = vec_types.h > htmxlintrin.h paired.h spe.h = stdarg.h stdfix.h tgmath.h >=20 > = /usr/local/lib/gcc49/gcc/powerpc64-portbld-freebsd11.0/4.9.4/include-fixed= : > README libmilter limits.h netinet = stddef.h stdio.h stdlib.h sys = syslimits.h unistd.h wchar.h But at least in recent times after WCHAR_TYPE was fixed for = powerpc/powerpc64 I've not had troubles that traced to these for CC and = CXX being based on gcc49 while XCC and XCXX were based on powerpc64-gcc = for buildworld/buildkernel on a powerpc64 host. I have had various examples of /usr/local/include/ files breaking builds = depending on what ports were in place at the time. All along I've been = doing renaming in that area to allow buildworld/buildkernel use. =3D=3D=3D Mark Millard markmi at dsl-only.net Message history: On 2016-Mar-31, at 3:34 PM, Bryan Drewery = wrote: >=20 > On 3/31/16 3:02 PM, Mark Millard wrote: >>>> We likely just need to prioritize /usr/include over = /usr/local/include >>>> for these phases, which gcc49 may have backwards since it has its = prefix >>>> set to /usr/local from the ports build. >=20 > Yup this is the problem with using the ports compiler as the "host" > compiler: >=20 >> # echo '' |/usr/local/bin/gcc49 -v -x c++ - -o /dev/null >> Using built-in specs. >> COLLECT_GCC=3D/usr/local/bin/gcc49 >> = COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd1= 1.0/4.9.4/lto-wrapper >> Target: x86_64-portbld-freebsd11.0 >> Configured with: ./../gcc-4.9-20160210/configure = --with-build-config=3Dbootstrap-debug --disable-nls = --enable-gnu-indirect-function --libdir=3D/usr/local/lib/gcc49 = --libexecdir=3D/usr/local/libexec/gcc49 --program-suffix=3D49 = --with-as=3D/usr/local/bin/as --with-gmp=3D/usr/local = --with-gxx-include-dir=3D/usr/local/lib/gcc49/include/c++/ = --with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports = Collection' --with-system-zlib = --with-ecj-jar=3D/usr/local/share/java/ecj-4.5.jar = --enable-languages=3Dc,c++,objc,fortran,java --prefix=3D/usr/local = --localstatedir=3D/var --mandir=3D/usr/local/man = --infodir=3D/usr/local/info/gcc49 --build=3Dx86_64-portbld-freebsd11.0 >> Thread model: posix >> gcc version 4.9.4 20160210 (prerelease) (FreeBSD Ports Collection) >> COLLECT_GCC_OPTIONS=3D'-v' '-o' '/dev/null' '-mtune=3Dgeneric' = '-march=3Dx86-64' >> /usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/cc1plus = -quiet -v - -quiet -dumpbase - -mtune=3Dgeneric -march=3Dx86-64 -auxbase = - -version -o /tmp//ccA75yFy.s >> GNU C++ (FreeBSD Ports Collection) version 4.9.4 20160210 = (prerelease) (x86_64-portbld-freebsd11.0) >> compiled by GNU C version 4.9.4 20160210 (prerelease), GMP = version 5.1.3, MPFR version 3.1.3, MPC version 1.0.3 >> GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 >> ignoring nonexistent directory = "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/../../../../../= x86_64-portbld-freebsd11.0/include" >> #include "..." search starts here: >> #include <...> search starts here: >> /usr/local/lib/gcc49/include/c++/ >> /usr/local/lib/gcc49/include/c++//x86_64-portbld-freebsd11.0 >> /usr/local/lib/gcc49/include/c++//backward >> /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include >> /usr/local/include >> = /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed >> /usr/include >> End of search list. >=20 > Note the /usr/local/include and /usr/include order near the end. >=20 > Passing -isystem /usr/include seems to fix it: >=20 >> # echo '' |/usr/local/bin/gcc49 -v -x c++ - -o /dev/null -isystem = /usr/include >> Using built-in specs. >> COLLECT_GCC=3D/usr/local/bin/gcc49 >> = COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd1= 1.0/4.9.4/lto-wrapper >> Target: x86_64-portbld-freebsd11.0 >> Configured with: ./../gcc-4.9-20160210/configure = --with-build-config=3Dbootstrap-debug --disable-nls = --enable-gnu-indirect-function --libdir=3D/usr/local/lib/gcc49 = --libexecdir=3D/usr/local/libexec/gcc49 --program-suffix=3D49 = --with-as=3D/usr/local/bin/as --with-gmp=3D/usr/local = --with-gxx-include-dir=3D/usr/local/lib/gcc49/include/c++/ = --with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports = Collection' --with-system-zlib = --with-ecj-jar=3D/usr/local/share/java/ecj-4.5.jar = --enable-languages=3Dc,c++,objc,fortran,java --prefix=3D/usr/local = --localstatedir=3D/var --mandir=3D/usr/local/man = --infodir=3D/usr/local/info/gcc49 --build=3Dx86_64-portbld-freebsd11.0 >> Thread model: posix >> gcc version 4.9.4 20160210 (prerelease) (FreeBSD Ports Collection) >> COLLECT_GCC_OPTIONS=3D'-v' '-o' '/dev/null' '-isystem' '/usr/include' = '-mtune=3Dgeneric' '-march=3Dx86-64' >> /usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/cc1plus = -quiet -v -isystem /usr/include - -quiet -dumpbase - -mtune=3Dgeneric = -march=3Dx86-64 -auxbase - -version -o /tmp//ccNh006Z.s >> GNU C++ (FreeBSD Ports Collection) version 4.9.4 20160210 = (prerelease) (x86_64-portbld-freebsd11.0) >> compiled by GNU C version 4.9.4 20160210 (prerelease), GMP = version 5.1.3, MPFR version 3.1.3, MPC version 1.0.3 >> GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 >> ignoring nonexistent directory = "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/../../../../../= x86_64-portbld-freebsd11.0/include" >> ignoring duplicate directory "/usr/include" >> #include "..." search starts here: >> #include <...> search starts here: >> /usr/include >> /usr/local/lib/gcc49/include/c++/ >> /usr/local/lib/gcc49/include/c++//x86_64-portbld-freebsd11.0 >> /usr/local/lib/gcc49/include/c++//backward >> /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include >> /usr/local/include >> = /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed >=20 > I didn't realize the ports compiler was defaulting /usr/local/include > into the search path now. It does not have /usr/local/lib in the > default library path as far as I can tell. It's also broken for its > -rpath (noted in its pkg-message). So having a default > /usr/local/include path seems odd. >=20 > Adding -isystem /usr/include to fix this is probably possible but > there's a risk someone will remove it as redundant. In this case I = wish > /usr/include was first but I'm not sure what impact that would have on > consumers expecting /usr/local/include (and /usr/local/lib) overrides = to > work, though they would need to pass a -L /usr/local/lib anyhow and > would likely be passing -I /usr/local/lib too. >=20 >=20 >=20 > --=20 > Regards, > Bryan Drewery >=20