From owner-svn-src-head@freebsd.org Thu Sep 1 16:54:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9744FBCCC68; Thu, 1 Sep 2016 16:54:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 593BB6EA; Thu, 1 Sep 2016 16:54:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 1BC385A9F27; Thu, 1 Sep 2016 16:54:46 +0000 (UTC) Date: Thu, 1 Sep 2016 16:54:46 +0000 From: Brooks Davis To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305170 - head/lib/atf/libatf-c Message-ID: <20160901165446.GE29873@spindle.one-eyed-alien.net> References: <201609010242.u812gBkP037525@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mSxgbZZZvrAyzONB" Content-Disposition: inline In-Reply-To: <201609010242.u812gBkP037525@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 16:54:53 -0000 --mSxgbZZZvrAyzONB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 01, 2016 at 02:42:11AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Thu Sep 1 02:42:11 2016 > New Revision: 305170 > URL: https://svnweb.freebsd.org/changeset/base/305170 >=20 > Log: > Don't bake all of CC/CPP/CXX into CFLAGS > =20 > Capture executable names for CC, CPP, CXX (assumed to be the > first non-CCACHE_BIN word). > =20 > This change strips out all of the cross-compiler arguments, (-target, > -B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it > doesn't infect the build and subsequently the test. > =20 > Add comments noting why this logic is being added, and why the logic in > r305041 was necessary/what it was trying to achieve. > =20 > This is required after recent changes made to the toolchain to always > specify --sysroot, -target, -B, etc with clang in buildworld (presumably > r304681). > =20 > Reviewed by: rodrigc (earlier version) > Reported by: Jenkins (FreeBSD_HEAD job from 559+) > MFC after: 12 days > X-MFC with: r304681, r305041 > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D7732 >=20 > Modified: > head/lib/atf/libatf-c/Makefile >=20 > Modified: head/lib/atf/libatf-c/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/atf/libatf-c/Makefile Thu Sep 1 02:05:46 2016 (r305169) > +++ head/lib/atf/libatf-c/Makefile Thu Sep 1 02:42:11 2016 (r305170) > @@ -28,6 +28,18 @@ > .include > .include > =20 > +# Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure oth= er > +# values -- like -target, -B ..., etc -- don't get leaked into the tests. > +# > +# Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it g= ets > +# automatically appended to the variables in bsd.compiler.mk when > +# ${MK_CCACHE_BUILD} !=3D no. > +ATF_BUILD_CC:=3D ${CC:N${CCACHE_BIN}:[1]} > +ATF_BUILD_CPP:=3D ${CPP:N${CCACHE_BIN}:[1]} > +ATF_BUILD_CXX:=3D ${CXX:N${CCACHE_BIN}:[1]} > + > +# Only capture defines, includes, linker flags, optimization levels, war= nings > +# and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. > ATF_BUILD_CFLAGS:=3D ${CFLAGS:M-[DILOWf]*} > ATF_BUILD_CPPFLAGS:=3D ${CPPFLAGS:M-[DILOWf]*} > ATF_BUILD_CXXFLAGS:=3D ${CXXFLAGS:M-[DILOWf]*} > @@ -41,11 +53,11 @@ ATF=3D ${SRCTOP}/contrib/atf > .PATH: ${ATF}/atf-c > .PATH: ${ATF}/atf-c/detail > =20 > -CFLAGS+=3D -DATF_BUILD_CC=3D'"${CC}"' > +CFLAGS+=3D -DATF_BUILD_CC=3D'"${ATF_BUILD_CC}"' > CFLAGS+=3D -DATF_BUILD_CFLAGS=3D'"${ATF_BUILD_CFLAGS}"' > -CFLAGS+=3D -DATF_BUILD_CPP=3D'"${CPP}"' > +CFLAGS+=3D -DATF_BUILD_CPP=3D'"${ATF_BUILD_CPP}"' > CFLAGS+=3D -DATF_BUILD_CPPFLAGS=3D'"${ATF_BUILD_CPPFLAGS}"' > -CFLAGS+=3D -DATF_BUILD_CXX=3D'"${CXX}"' > +CFLAGS+=3D -DATF_BUILD_CXX=3D'"${ATF_BUILD_CXX}"' > CFLAGS+=3D -DATF_BUILD_CXXFLAGS=3D'"${ATF_BUILD_CXXFLAGS}"' > CFLAGS+=3D -I${ATF} > CFLAGS+=3D -I${.CURDIR} >=20 Are these the variables used to control the tests that try to compile things? I've run into to some problems with them on CheriBSD because the external compiler isn't available on the test target, but isn't listed as a dependency. These tests should declare a dependency on CC, etc as appropriate and be skipped if it isn't there. I'm not actually convinced this shouldn't just use cc, cpp, and c++. (That would be wrong for CheriBSD, but closer to right for current cases in FreeBSD). -- Brooks --mSxgbZZZvrAyzONB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJXyF1VAAoJEKzQXbSebgfAnkgH/36zFJ20O8GhTr4Skl9giZI3 a2/kix/8+ogCWuDhBaU4zTAF2Pg2Dqk5fRac/Y9SdOO0pbHX0B3nh90xRTfVOPzI mlbWQQtkOWVpgi0rxaK0MYzQnd+RYEuDKeruP2OvUkn7mzzuIFyJOLkdVhj56ZSL PtX8uHkCTEQGGocBH0jeD6rzFyAMkwFp2Q1koZ+Y2Q8hZKXijpOEUTxc9j08Zdgf 4aAO5HF4stFyLY/SuL/oZjWs8ZKYODBtGIvdHdyi0ZuCxKu22x8W9lWuACj1+jAk YwraEqLnNho/3B8n68md1HIm/9spdFqW4kTEog7/ux0hgeYp8AGkOYYzsX/R7H8= =pRbJ -----END PGP SIGNATURE----- --mSxgbZZZvrAyzONB--