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

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

> 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.
>
> so instead of adding XFLAGS to XC*FLAGS, the XFLAGS should juste be converted
> into XC*FLAGS directly in my opinion.

  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.

later,

Peter.

--- Makefile.inc1	(revision 278542)
+++ Makefile.inc1	(working copy)
@@ -348,16 +348,15 @@
  		SIZE="${XSIZE}"

  .if ${XCC:M/*}
-XFLAGS=		--sysroot=${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+=	-B${CROSS_BINUTILS_PREFIX}
+BFLAGS+=	-B${CROSS_BINUTILS_PREFIX}
  .endif
  .else
-XFLAGS+=	-B${WORLDTMP}/usr/bin
+BFLAGS+=	-B${WORLDTMP}/usr/bin
  .endif
  .if ${TARGET} == "arm"
  .if ${TARGET_ARCH:M*hf*} != ""
@@ -374,6 +373,8 @@
  TARGET_ABI?=	unknown
  TARGET_TRIPLE?=	${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
  XCFLAGS+=	-target ${TARGET_TRIPLE}
+XCFLAGS+=	--sysroot=${WORLDTMP} ${BFLAGS}
+XCXXFLAGS+=	--sysroot=${WORLDTMP} ${BFLAGS}
  .endif
  .endif





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