Date: Mon, 17 Nov 2014 04:27:29 -0800 From: Garrett Cooper <yaneurabeya@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: sbruno@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mips misbehaving, not respecting make.conf Message-ID: <25214F2D-5B60-480E-906C-EDE19F2CE3AB@gmail.com> In-Reply-To: <DA067595-BD57-48C8-A79A-F6D6A17BD78A@bsdimp.com> References: <1416179733.1098.1200.camel@bruno> <735BCED8-EBC1-4B65-AA34-1866ECDF3070@gmail.com> <DA067595-BD57-48C8-A79A-F6D6A17BD78A@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_65506A37-AD99-4E0A-B0FA-F9D4E31046A7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 16, 2014, at 16:01, Warner Losh <imp@bsdimp.com> wrote: > On Nov 16, 2014, at 4:36 PM, Garrett Cooper <yaneurabeya@gmail.com> = wrote: >=20 >> On Nov 16, 2014, at 15:15, Sean Bruno <sbruno@ignoranthack.me> wrote: >>=20 >>> I have set make.conf to use AS=3D/nxb-bin/usr/bin/as and >>> CC=3D/nxb-bin/usr/bin/cc >>>=20 >>> Yet, while monitoring, I still see the ports build process >>> using /usr/bin/as and /usr/bin/ld and /usr/libexec/cc1 >>>=20 >>> I don't see this on armv6 when building in a jail + qemu. >>>=20 >>> I'm trying to understand what is missing from our gcc toolchain here >>> that is causing the builds to ignore my directives. >>=20 >> It all kinds of boils down to this bug with the configuration of our = base system copy of gcc: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D192394 . >=20 > I=92ve never seen this happen in the decade or so I=92ve been doing = cross builds. I=92ve seen gcc breakage, but always from stupid C or C++ = tricks, not from how we have things setup. There are a lot of nifty features in the binutils/gcc configuration that = we don=92t tweak, for better or for worse. -sysroot is one item (that I = brought up before), but it=92s not Sean=92s problem. Still, it needs to = be fixed because we still ship gcc today on the tier-2/-3 platforms and = I=92ve hit bugs in the past where it picks up the wrong headers with = gcc, but not clang. >> The prefixing/sysroot isn=92t being setup properly, which means that = you have to use $PATH to tell gcc and friends which tool you want to use = (which make buildworld, etc does). One way to fix this (if we used = autoconf in the base system build) would be to reconfigure it with a = particular sysroot: >>=20 >> $ ./configure --help | grep -A 3 sysroot >> --with-build-sysroot=3Dsysroot >> use sysroot as the system root during the = build >> --with-sysroot=3DDIR Search for usr/lib, usr/include, et al, within = DIR. >> --with-gnu-ld assume the C compiler uses GNU ld default=3Dno >> --with-libiconv-prefix[=3DDIR] search for libiconv in DIR/include = and DIR/lib >> --without-libiconv-prefix don't search for libiconv in includedir = and libdir >> $ svn info configure | grep ^URL: >> URL: svn+ssh://ngie@svn.freebsd.org/base/head/contrib/gcc/configure >=20 > The native-xtools builds should be setup to use the right binaries. I = don=92t think this is sean=92s problem. Correct (as I noted in my later reply). The thing is that we override = PREFIX with binutils/gcc and there aren=92t really any blatant comments = in the source code pointing out why things are being done that way. You = have to use svn blame and svn log to find the right commit that = describes the feature. Cheers! ------------------------------------------------------------------------ r55220 | obrien | 1999-12-29 06:42:46 -0800 (Wed, 29 Dec 1999) | 6 lines Allow the specification of a prefix for gcc to find all the various = bits. If one wishes to anchor the compiler toolchain tree somewhere other than = /, all one needs to do is set "TOOLS_PREFIX" to a different rooting. Submitted by: marcel (in a different format and reworked by me) --Apple-Mail=_65506A37-AD99-4E0A-B0FA-F9D4E31046A7 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUaemxAAoJEMZr5QU6S73eU10H/0TRgoBA4hRLI2MMFOPd+gKD QZNd22P3XqyMJPOQblfP5BQEs3+bZoe5CiA1lsV7D/axV8P1ArqyJokYhq0fLy/0 vSq/GlMvHn5gLihF3+MvqZqs1so130DJJpGAmN64MRRAtg0cshjbFR/vM+8Yh4/O KUxk1OgQhkfMqwmE/WYj0QJrOYrEXVapTGZ+3WzDgFOczfwZKkvk83hLcZFARV1X r4IsJHMKrZR6NqrVQSqnxOPr1b0D6Vq6kCZ9Z5A6K8afhHU86z/cydgY7IsmTgt2 0lpfM/UJRxSFbn4+nJwU65YHBM2Bn10ijXvQkg4elt7pEjUp9mYYXr5+05w8bo0= =yNCT -----END PGP SIGNATURE----- --Apple-Mail=_65506A37-AD99-4E0A-B0FA-F9D4E31046A7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25214F2D-5B60-480E-906C-EDE19F2CE3AB>