Date: Mon, 25 Feb 2019 20:24:27 +0000 From: Brooks Davis <brooks@freebsd.org> To: John Baldwin <jhb@FreeBSD.org> Cc: Brandon Bergren <freebsd@bdragon.rtk0.net>, "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org> Subject: Re: External GCC Update Message-ID: <20190225202427.GD47081@spindle.one-eyed-alien.net> In-Reply-To: <3153f8b9-5873-8ff1-a63f-b57cab887556@FreeBSD.org> References: <e8d1431f-cf99-1986-7f23-6ff0f4cd8314@FreeBSD.org> <b8f8b304-d7af-4c53-82ac-ed4e9e6b78dc@www.fastmail.com> <3153f8b9-5873-8ff1-a63f-b57cab887556@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--KDt/GgjP6HVcx58l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 25, 2019 at 10:50:40AM -0800, John Baldwin wrote: > On 2/22/19 6:03 PM, Brandon Bergren wrote: > >=20 > >=20 > > On Fri, Feb 22, 2019, at 1:01 PM, John Baldwin wrote: > >> 3) I add support for an /etc/src.conf.d dir that can hold files that g= et > >> treated as if they are part of /etc/src.conf. The current patch on > >> github for this only fixes world and not yet kern.pre.mk and probab= ly > >> needs the most review if we want to go forward with this route. Wi= th > >> this, I plan to have the base/* packages install suitable files in = this > >> dir that disable build of the src-based components and also set > >> WITH_BASE_<foo> to make sure 'delete-old' DTRT. > >=20 > > Not sure if I like this. Can't src.opts.mk just call `pkg info -e base/= binutils` and so forth and use the exit result to adjust the defaults? >=20 > That requires src.opts.mk to encode the policy that each package wants to > enforce rather than letting the package choose the policy it wants to > enforce. I think we want the latter. > =20 > >> The file for base/binutils would be: > >> > >> CROSS_BINUTILS_PREFIX=3D/usr/bin/ > >> WITH_BASE_BINUTILS=3Dyes > >> WITHOUT_BINUTILS=3Dyes > >> WITHOUT_LLD_IS_LD=3Dyes > >> > >> The file for base/gcc would be: > >> > >> XCC=3D/usr/bin/cc > >> XCXX=3D/usr/bin/c++ > >> XCPP=3D/usr/bin/cpp > >> X_COMPILER_TYPE=3Dgcc > >> WITH_BASE_GCC=3Dyes > >> WITHOUT_GCC=3Dyes > >> WITHOUT_CLANG_IS_CC=3Dyes > >=20 > > I don't like the concept of packages messing with anything related to s= rc.conf. I have a bunch of conditional stuff in mine broken out by ${TARGET= _ARCH} and extra config suddenly appearing would break a lot of my cross co= mpiling stuff, even if it is in a separate *.d folder. > >=20 > > Seems to me that just influencing src.opts.mk's defaults would be more = robust. >=20 > Hmm, cross compiling is indeed a bear. My original version of this was to > have base/gcc install a special 'freebsd-gcc.mk' toolchain file to > /usr/share/toolchains and modify Makefile.inc1 to use this as the default > CROSS_TOOLCHAIN if present. I mostly didn't like this because it would be > a single file that so you can't set separate policy if, for example, some > arch or install only wanted base/binutils and not base/gcc. On the other > hand, it had the advantage that setting an explicit CROSS_TOOLCHAIN when = you > are cross compiling would work correctly. >=20 > Perhaps I can rework this to use two files in /usr/share/toolchains and h= ave > Makefile.inc1 explicitly include any files in that directory if > CROSS_TOOLCHAIN isn't set? I think I like that option best. Another way to deal with the two-files issue would be to have a base/toolchain metaport with options that installs the consolidated file you want. That mirrors (somewhat) the setup in devel/*xtoolchain*, but I'm not convinced it won't just lead to confusion. -- Brooks --KDt/GgjP6HVcx58l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcdE76AAoJEKzQXbSebgfAvioH/iO5vzVoiZeK2sx4UFinKAn9 4vaExE7bU+zKZqsGI+/NZObNfHlFT5TtmEKVKF2UILx4H/5665tXeTjVFCZzrrJP qmfr76Q0KrTxurcEOiAMkS6JvARIunKxv8buiGyzKKuvKG9UYQg3AWMt8K4fOR0Z nECWoZHZ/+k47DjUKrjpctPp3Gd6+4g84+Ryr+mLoUEUFYBtL1DJx1O3GG6K7Mzd d2hmi3v6eUwiqsXn7MET5mos8HugpQvPe2T3wa66bseEMYaZ4YD42KkI044Z8clm TsrNVRcreKCTopRQJnLxCxqN3YOt+PV+EEVTMGrrpzBsbV/on/i30XTZOZPB0aw= =Jv5f -----END PGP SIGNATURE----- --KDt/GgjP6HVcx58l--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190225202427.GD47081>