Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2015 19:50:59 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Peter Grehan <grehan@FreeBSD.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: Resurrecting clang external toolchain support in Makefile.inc
Message-ID:  <D5BF8A1B-FA6F-4A0D-A109-D23867FA9F17@bsdimp.com>
In-Reply-To: <54DABF3A.8060003@freebsd.org>
References:  <54DABF3A.8060003@freebsd.org>

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

> 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 =
toolchain 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, resulting 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}-freebsd11.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 ?

I have a similar =E2=80=9Cfix=E2=80=9D in my tree as well, but hadn=E2=80=99=
t pushed it because I wasn=E2=80=99t quite sure the right way either.

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D5BF8A1B-FA6F-4A0D-A109-D23867FA9F17>