Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Aug 2015 22:54:13 -0700
From:      Jordan Hubbard <jordanhubbard@me.com>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        Bill Sorenson <instructionset@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Kevin Bowling <kevin.bowling@kev009.com>, "K. Macy" <kmacy@freebsd.org>
Subject:   Re: Sparc64 support
Message-ID:  <A8AE31ED-CD22-4FE1-B888-3371502B634E@me.com>
In-Reply-To: <CAJ-VmokHCW8MawfVC_1z2SZ7hfX4wXBqNoGPHQQxya2rV%2B1QMw@mail.gmail.com>
References:  <CACcTwYmS1c5uoO-WiJQDwgqYAevX7WZ7ZrP297hnOu7cNET3CA@mail.gmail.com> <mq3sg1$bno$1@ger.gmane.org> <CACcTwYnU=E-6sV3yLh3yKUSPZOg7967XV5ToXoSVPuNfOjF7hQ@mail.gmail.com> <CAHM0Q_NEYWxpHCwEdytfY6i9%2BRO2BebezzmenfQ_1c4u7zGrgg@mail.gmail.com> <CACcTwY=DcUREt5nJWo_eJfrB=3sQXBaS6nc%2B07fpZhxARD0zTQ@mail.gmail.com> <20150809215403.GC20238@server.rulingia.com> <6C12EBFE-EAA9-4C12-9F03-1CB2C28C4A6E@me.com> <CACcTwYktQRTqVSr7PRr5huwbVXVu6oCy26TKiAxzf2NiGAcocA@mail.gmail.com> <51EEBC6E-5D85-439D-874D-D223EE045515@me.com> <CAJ-VmomzV0YKQwenwSZv6fMAOUP8TmPs-oyQaM8KTF7Ndhv_%2Bw@mail.gmail.com> <926DDA42-8883-4AB4-B229-D44387FF5C6B@me.com> <CAJ-VmokHCW8MawfVC_1z2SZ7hfX4wXBqNoGPHQQxya2rV%2B1QMw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Aug 9, 2015, at 10:11 PM, Adrian Chadd <adrian.chadd@gmail.com> =
wrote:
>=20
> It's supposed to be (for mips):
>=20
> pkg install mips-gcc mips-xtoolchain
> make ... CROSS_TOOLCHAIN=3Dmips-gcc ...
>=20
> .. however there are loose ends to fix that prevent that from working
> out of the box.

OK, so here=E2=80=99s what I would propose (and I would even, gulp, be =
willing to toss a little engineering resources at it if it makes it =
actually happen):

1. We add some sort of arch-bootstrap rule to /usr/src/Makefile which =
does the following:

	1a. If TARGET_ARCH is one of the =E2=80=9Cclang supported=E2=80=9D=
 architectures, it sets some =E2=80=9Cuse internal compiler=E2=80=9D =
flags and declares an early victory.  Go to step 1d.

	1b. If TARGET_ARCH is one of those =E2=80=9CNo one can explain =
to Adrian just how this even works=E2=80=9D then it just falls out of =
-current until someone can do steps 1b and 1d.

	1c. If TARGET_ARCH is one of the =E2=80=9Cexternal toolchain=E2=80=
=9D supported architectures then it does the appropriate ``pkg info =
blah'' introspection to see if the appropriate toolchain is already =
installed, and if so, we go to step 1d.  Otherwise, it goes =E2=80=9CBleah=
!  You must: pkg install 6502-weird-ancient-gcc 6502-apple][-runtime=E2=80=
=9D and aborts, so the user can then make the determination about =
whether to cruft up their build machine with those packages and retry =
the operation.

	1d. All of the appropriate COMPILER_FOO variables are set to =
compile for TARGET_ARCH and away we go.

2. Having done #1, we de-orbit the base version of gcc and let clang =
take its rightful place as the only =E2=80=9Cinternal compiler=E2=80=9D =
supported in base.  None of the weird architecture folks can complain =
that we just broke -current for them because the arch-bootstrap rule =
will do all the right things for their architecture (or if it doesn=E2=80=99=
t, they know what to hack until it does) and steer the user in the =
direction of the appropriate package(s).

Am I missing anything?  Is it really that obvious?  It seems I must be =
missing something if this is truly just a 2 step process. :)

- Jordan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8AE31ED-CD22-4FE1-B888-3371502B634E>