From owner-svn-src-head@freebsd.org Mon Aug 20 19:48:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C607A107ACA5 for ; Mon, 20 Aug 2018 19:48:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5620D7E8C8 for ; Mon, 20 Aug 2018 19:48:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id v71-v6so1025080itb.3 for ; Mon, 20 Aug 2018 12:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8tvmYva83WQ+/VoPCVyZcR02mTLbrUBuCNFyJQhp5Zs=; b=Y4ISaB/A+AUTrjrmaSp+o7lPy6vMr4cBK9dKNYs9e/7dJ7GtA1OQr92/C0+GGMUoge R4MmIhW8lSj4/MjNl+kVHhPKXjUPNgPEVt7iIFej1nFvI2F8GMY7emp1NFAFiWWgStQD ZVR1MlOn4gCgfpBX/qihnjZNoifbaDlvD+aGoLV6pPqQqg63OmFpuxDcfHBtDU/u1pWk rlL48w8afshWv63750WkHb8JTxxN7qdKkPb3NwGYc9sLOe9ft85ZisOUGbukiqHkKlwo 8bpk1JN7zJtSek4bZzpDD/WY9Nrtbyg9q6DuyjYvXnM4tS3FeAwIXI7cd9vhHoHtgh8s K2/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8tvmYva83WQ+/VoPCVyZcR02mTLbrUBuCNFyJQhp5Zs=; b=MwNPGpG73z0kuJT61zfLc96iEg329Hp+pUdfAS0Pn1bP38WMG7L7qmMUm+ObMBxNst RKTC45t3mZNBND5jzaAGnLncNdttdSV7fsZL5AINq0eQdQJ5/2AsekXBCCFl5+LuXrCK UcdEzrIBfe7353AjnL7cpNW1e1xmqNxVcmtEMWATCRtk3l6XO/a5WA4MHAdS4mb6OiK2 sw56QxLusfhN7ORuaYeI1b/sPPG/ThuY+EZU2GzvvyvoPCiOSU/j2cSUcQ+vub3hXXWA JUn6GELcMZ4ZlEUXnHigwSOFxsEoN0O8QZ9CW2oS8t7+oMZQdy2uDD6hCH8n4fFObD9T yGOA== X-Gm-Message-State: AOUpUlHoyIMR6Pgxx83v+bd9047fQHiAfS0Txbjdo80Bb6bFnCLFvlDB Wp1zQ6bfNz+Ppdl9NWdTazfBU9HFCN30XmKsuPYR4fagzQ8= X-Google-Smtp-Source: AA+uWPznutyOgrfpCEWYzLLPLGYCkxwsyEkFa/zcObTvlfuefR3VRAOzmKBOHe6+f8CBFjn9MTTXioKJJ75Kcw6NuMc= X-Received: by 2002:a24:83c6:: with SMTP id d189-v6mr14292025ite.75.1534794526539; Mon, 20 Aug 2018 12:48:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 12:48:45 -0700 (PDT) X-Originating-IP: [50.227.106.226] In-Reply-To: <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> References: <201808201039.w7KAdhfX079450@repo.freebsd.org> <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> From: Warner Losh Date: Mon, 20 Aug 2018 13:48:45 -0600 X-Google-Sender-Auth: 7fkC9eL5-gjyxH7fruNlZD_FjWU Message-ID: Subject: Re: svn commit: r338096 - head/tools/build/mk To: "O. Hartmann" Cc: Alex Richardson , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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: Mon, 20 Aug 2018 19:48:48 -0000 On Mon, Aug 20, 2018 at 1:45 PM, O. Hartmann wrote= : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Am Mon, 20 Aug 2018 10:39:43 +0000 (UTC) > Alex Richardson schrieb: > > > Author: arichardson > > Date: Mon Aug 20 10:39:42 2018 > > New Revision: 338096 > > URL: https://svnweb.freebsd.org/changeset/base/338096 > > > > Log: > > Avoid depending on system headers from the source tree during bootstr= ap > > > > This can cause surprising errors if the build tools is built against > > headers that don't match the host system. It is also required in orde= r > > to allow building on non-FreeBSD systems where the headers in > > /usr/include/sys are usually completely incompatible with those in th= e > > source tree. > > > > I added an error to Makefile.boot if this is done and found this was > > only the case in libnv. With this error in the Makefile ABI breakages > > such as r336019 should no longer be possible. > > > > Reviewed By: bdrewery, kevans > > Approved By: jhb (mentor) > > Differential Revision: https://reviews.freebsd.org/D16186 > > > > Modified: > > head/tools/build/mk/Makefile.boot > > > > Modified: head/tools/build/mk/Makefile.boot > > =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/tools/build/mk/Makefile.boot Mon Aug 20 10:39:37 2018 > (r338095) > > +++ head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:42 2018 > (r338096) > > @@ -7,3 +7,20 @@ LDFLAGS+=3D -L${WORLDTMP}/legacy/usr/lib > > > > # we do not want to capture dependencies referring to the above > > UPDATE_DEPENDFILE=3D no > > + > > +# When building host tools we should never pull in headers from the > source sys > > +# directory to avoid any ABI issues that might cause the built binary > to crash. > > +# The only exceptions to this are sys/cddl/compat for dtrace bootstrap > tools and > > +# sys/crypto for libmd bootstrap. > > +.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*: > N*${SRCTOP}/sys/crypto*) > > +.error Do not include $${SRCTOP}/sys when building bootstrap tools. \ > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > instead. \ > > + Error was caused by Makefile in ${.CURDIR} > > +.endif > > + > > +# ${SRCTOP}/include should also never be used to avoid ABI issues > > +.if !empty(CFLAGS:M*${SRCTOP}/include*) > > +.error Do not include $${SRCTOP}/include when building bootstrap tools= . > \ > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > instead. \ > > + Error was caused by Makefile in ${.CURDIR} > > +.endif > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > This commit seems to break NanoBSD builds! > > While r338095 still build my NanoBSD obj tree, >=3D r338096 fails with: > > [...] > - --- obj_crunchdir_gbde --- > cd /pool/sources/CURRENT/src/rescue/rescue/../../sbin/gbde && MK_TESTS= =3Dno > UPDATE_DEPENDFILE=3Dno _RECURSING_CRUNCH=3D1 > MAKEOBJDIRPREFIX=3D/pool/nanobsd/amd64/ALERICH_amd64/ > pool/sources/CURRENT/src/amd64.amd64/rescue/rescue > make MK_AUTO_OBJ=3Dno DIRPRFX=3Drescue/rescue/gbde/ -DRESCUE > CRUNCH_CFLAGS=3D-DRESCUE > MK_AUTO_OBJ=3Dno obj make[5]: "/pool/sources/CURRENT/src/ > tools/build/mk/Makefile.boot" > line 18: Do not include ${SRCTOP}/sys when building bootstrap tools. Cop= y > the header to > ${WORLDTMP}/legacy in tools/build/Makefile instead. Error was caused by > Makefile > in /pool/sources/CURRENT/src/sbin/gbde *** [obj_crunchdir_gbde] Error > code 1 > NanoBSD just does a buildworld with a few env vars, but nothing exotic.... And in the case of 'obj' target, who cares about the includes... Warner > - -- > O. Hartmann > > Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr > Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Ab= s. 4 BDSG). > -----BEGIN PGP SIGNATURE----- > > iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW3sadQAKCRDS528fyFhY > lPM7Af4iQXvPALoDxlQNnJXuWsqi+ntJ/8RoSHcz9rh7oVBOIqAm/O8IQ46GxKSP > j1WhU/mQ26cNCLeE0QR7uueDhPVAAf42QU5z9iO9mZ/q1mgg0tDhDkkZkcPkrbFm > mj/dWopPygFgptxOYiP78Jzp1IHf2QJjHCRmv13fbE8IrIO0BnbJ > =3DFS8J > -----END PGP SIGNATURE----- >