Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2015 18:02:09 -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:  <C03794BD-6371-42F3-A5D4-75636C21505E@bsdimp.com>
In-Reply-To: <54DBED83.8070204@freebsd.org>
References:  <54DABF3A.8060003@freebsd.org> <D5BF8A1B-FA6F-4A0D-A109-D23867FA9F17@bsdimp.com> <20150211084534.GY29891@ivaldir.etoilebsd.net> <54DBED83.8070204@freebsd.org>

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

> On Feb 11, 2015, at 5:02 PM, Peter Grehan <grehan@freebsd.org> wrote:
>=20
> Hi Bapt,
>=20
>> 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 the
>> name was confusing.
>>=20
>> so instead of adding XFLAGS to XC*FLAGS, the XFLAGS should juste be =
converted
>> into XC*FLAGS directly in my opinion.
>=20
> How about the appended ? It moves the sysroot definition into the =
non-GCC XC/XCXXFLAGS defs, and renames XFLAGS to BFLAGS. This should be =
identical to pre r273755 behaviour.
>=20
> later,
>=20
> Peter.
>=20
> --- Makefile.inc1	(revision 278542)
> +++ Makefile.inc1	(working copy)
> @@ -348,16 +348,15 @@
> 		SIZE=3D"${XSIZE}"
>=20
> .if ${XCC:M/*}
> -XFLAGS=3D		--sysroot=3D${WORLDTMP}
> .if defined(CROSS_BINUTILS_PREFIX)
> # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
> # directory, but the compiler will look in the right place for it's
> # tools so we don't need to tell it where to look.
> .if exists(${CROSS_BINUTILS_PREFIX})
> -XFLAGS+=3D	-B${CROSS_BINUTILS_PREFIX}
> +BFLAGS+=3D	-B${CROSS_BINUTILS_PREFIX}
> .endif
> .else
> -XFLAGS+=3D	-B${WORLDTMP}/usr/bin
> +BFLAGS+=3D	-B${WORLDTMP}/usr/bin
> .endif
> .if ${TARGET} =3D=3D "arm"
> .if ${TARGET_ARCH:M*hf*} !=3D ""
> @@ -374,6 +373,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	--sysroot=3D${WORLDTMP} ${BFLAGS}
> +XCXXFLAGS+=3D	--sysroot=3D${WORLDTMP} ${BFLAGS}
> .endif
> .endif

I like this patch better than the one I have. I=E2=80=99m not 100% sure =
the =E2=80=98else=E2=80=99 clause will work, but it is certainly better =
than we have today.

Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C03794BD-6371-42F3-A5D4-75636C21505E>