Date: Thu, 28 Feb 2019 12:38:58 -0800 From: John Baldwin <jhb@FreeBSD.org> To: Brooks Davis <brooks@freebsd.org> Cc: Brandon Bergren <freebsd@bdragon.rtk0.net>, "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org> Subject: Re: External GCC Update Message-ID: <acd49f3e-a0c0-cc85-db7b-2fe97e75fcac@FreeBSD.org> In-Reply-To: <20190225202427.GD47081@spindle.one-eyed-alien.net> References: <e8d1431f-cf99-1986-7f23-6ff0f4cd8314@FreeBSD.org> <b8f8b304-d7af-4c53-82ac-ed4e9e6b78dc@www.fastmail.com> <3153f8b9-5873-8ff1-a63f-b57cab887556@FreeBSD.org> <20190225202427.GD47081@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/25/19 12:24 PM, Brooks Davis wrote: > On Mon, Feb 25, 2019 at 10:50:40AM -0800, John Baldwin wrote: >> 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. >> >> Perhaps I can rework this to use two files in /usr/share/toolchains and have >> 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. I've rebased and repushed the 'base_gcc' branch again to follow this approach. Rather than using a glob, it just hardcodes the two possible files. I did have to make one change which is that the helper files have to use 'export' for the WITH/WITHOUT variables or they weren't being honored in child makes. However, this approach works even for 'make buildenv' in my testing. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?acd49f3e-a0c0-cc85-db7b-2fe97e75fcac>