Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2015 09:45:34 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-toolchain@freebsd.org, Peter Grehan <grehan@FreeBSD.org>
Subject:   Re: Resurrecting clang external toolchain support in Makefile.inc
Message-ID:  <20150211084534.GY29891@ivaldir.etoilebsd.net>
In-Reply-To: <D5BF8A1B-FA6F-4A0D-A109-D23867FA9F17@bsdimp.com>
References:  <54DABF3A.8060003@freebsd.org> <D5BF8A1B-FA6F-4A0D-A109-D23867FA9F17@bsdimp.com>

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

--RUh7Gb6wQL2PrpWP
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 10, 2015 at 07:50:59PM -0700, Warner Losh wrote:
>=20
> > On Feb 10, 2015, at 7:32 PM, Peter Grehan <grehan@FreeBSD.org> wrote:
> >=20
> > Hi toolchain folk,
> >=20
> > I've recently tried using the base system clang as an external toolchai=
n i.e.
> >=20
> >   make CROSS_COMPILER_PREFIX=3D/usr/bin/ buildworld
> >=20
> > .. and found that this no longer works after r273755 which split XFLAGS=
 into XC/XCXXFLAGS. This appears to be because the XFLAGS definitions that =
define --sysroot and -B options aren't being passed through to clang, resul=
ting in using header files from the host system.
> >=20
> > My quick hack was
> >=20
> > --- Makefile.inc1	(revision 278542)
> > +++ Makefile.inc1	(working copy)
> > @@ -374,6 +374,8 @@
> > TARGET_ABI?=3D	unknown
> > TARGET_TRIPLE?=3D	${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd1=
1.0
> > XCFLAGS+=3D	-target ${TARGET_TRIPLE}
> > +XCFLAGS+=3D	${XFLAGS}
> > +XCXXFLAGS+=3D	${XFLAGS}
> > .endif
> > .endif
> >=20
> > However, this doesn't look to be the right way to fix this.
> >=20
> > Any opinions on a proper fix ?
>=20
> I have a similar =E2=80=9Cfix=E2=80=9D in my tree as well, but hadn=E2=80=
=99t pushed it because I wasn=E2=80=99t quite sure the right way either.
>=20
> Warner

In my opinion we should track down the last traces of XFLAGS and turn them =
into
proper XCFLAGS and XCXXFLAGS, the intent was to get rid of XFLAGS because t=
he
name was confusing.

so instead of adding XFLAGS to XC*FLAGS, the XFLAGS should juste be convert=
ed
into XC*FLAGS directly in my opinion.

Best regards,
Bapt

--RUh7Gb6wQL2PrpWP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlTbFq4ACgkQ8kTtMUmk6EzdRACglKn6YCo/ZgkPcZtpUXRgSxKY
vYAAn25LVYF5dxRf/b6slUUXOTXIr5Ju
=O1TQ
-----END PGP SIGNATURE-----

--RUh7Gb6wQL2PrpWP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150211084534.GY29891>