Date: Fri, 22 Feb 2019 21:03:43 -0500 From: "Brandon Bergren" <freebsd@bdragon.rtk0.net> To: "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org>, "John Baldwin" <jhb@FreeBSD.org> Subject: Re: External GCC Update Message-ID: <b8f8b304-d7af-4c53-82ac-ed4e9e6b78dc@www.fastmail.com> In-Reply-To: <e8d1431f-cf99-1986-7f23-6ff0f4cd8314@FreeBSD.org> References: <e8d1431f-cf99-1986-7f23-6ff0f4cd8314@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 22, 2019, at 1:01 PM, John Baldwin wrote: > I was recently able to install base/binutils and base/gcc into an amd6= 4 VM > and do a self-hosted build and install. Some of the port patches have= been > committed from this, but I have some source patches before the final p= orts > patches can be finished. >=20 > The source patches are here: > https://github.com/bsdjhb/freebsd/compare/master...base_gcc >=20 > They do a couple of things I'd like some feedback on: >=20 > 1) MK_GDB no longer depends on MK_BINUTILS so that /usr/libexec/gdb ca= n > still be built/installed when WITHOUT_BINUTILS=3Dyes is true Good thinking. > 2) WITH_BASE_GCC and WITH_BASE_BINUTILS knobs can be set in src.conf t= o > ensure that 'make delete-old' doesn't delete files installed by the= > base/* packages if you also set WITHOUT_BINUTILS=3Dyes, and similar= > knobs (because you don't want to build/install the ones from src) I was really confused about the naming when I read through the diff. Bik= eshedding but I think WITH_PORTS_BASE_BINUTILS / WITH_PORTS_BASE_GCC wou= ld help quite a lot cognitively, to differentiate between "base as in in= -tree binutils" and "base as in the base/binutils port" > 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. Not sure if I like this. Can't src.opts.mk just call `pkg info -e base/b= inutils` and so forth and use the exit result to adjust the defaults? > The file for base/binutils would be: >=20 > CROSS_BINUTILS_PREFIX=3D/usr/bin/ > WITH_BASE_BINUTILS=3Dyes > WITHOUT_BINUTILS=3Dyes > WITHOUT_LLD_IS_LD=3Dyes >=20 > The file for base/gcc would be: >=20 > 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 I don't like the concept of packages messing with anything related to sr= c.conf. I have a bunch of conditional stuff in mine broken out by ${TARG= ET_ARCH} and extra config suddenly appearing would break a lot of my cro= ss compiling stuff, even if it is in a separate *.d folder. Seems to me that just influencing src.opts.mk's defaults would be more r= obust. >=20 > Thoughts? >=20 > --=20 > John Baldwin >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > --=20 Brandon Bergren Technical Generalist
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b8f8b304-d7af-4c53-82ac-ed4e9e6b78dc>