From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 12 01:02:19 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12D33AC5 for ; Thu, 12 Feb 2015 01:02:19 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDE8497F for ; Thu, 12 Feb 2015 01:02:18 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id h15so678310igd.3 for ; Wed, 11 Feb 2015 17:02:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=CPekrUaYaB5Ci+z0OYXgRifQWHr2HhLXQr3KNB2zRlU=; b=Q6vlb5LCzZx18mNFZVAzWo0wo1gx8JoNKB4c1BNm8u9drBWODPpVAKa6nJ7azQkRjr ew7613X06pYNA3dC9x1tqO+Jw8g8lSd/AxGeln8g0pnD7177sPfBWDX+odRgmyWYGApp zzBY0G9GM2Kg22bYOqx+xuHp0b2WcXeuKq3JB5vtaCW6LGwQ39kVNcLFxNwicGJdtWTR 4/06r0HpFaP7wfL38ZolInR7v2d2o+rz92AUa3r5Fsm0gIkIpvNKiIYpBCEC8meEuBkP DNUUL/CACRN3AVEH+nAVKm8En1sYz9cuhz3PXcH29LseTg2S+RHbz6iTBP3azk25mgWA 0slQ== X-Gm-Message-State: ALoCoQn0YUhZpp0zaXEDlnbVuligDaaTkk+9X+ZHacpWb2YXdHjztSZe79jfdoidFXAKeafH3J/Z X-Received: by 10.107.27.76 with SMTP id b73mr1760005iob.64.1423702931001; Wed, 11 Feb 2015 17:02:11 -0800 (PST) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id k125sm1443740ioe.29.2015.02.11.17.02.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 17:02:10 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: Resurrecting clang external toolchain support in Makefile.inc From: Warner Losh In-Reply-To: <54DBED83.8070204@freebsd.org> Date: Wed, 11 Feb 2015 18:02:09 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <54DABF3A.8060003@freebsd.org> <20150211084534.GY29891@ivaldir.etoilebsd.net> <54DBED83.8070204@freebsd.org> To: Peter Grehan X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 01:02:19 -0000 > On Feb 11, 2015, at 5:02 PM, Peter Grehan 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