svn commit: r338096 - head/tools/build/mk
O. Hartmann
o.hartmann at walstatt.org
Mon Aug 20 20:00:44 UTC 2018
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Am Mon, 20 Aug 2018 13:48:45 -0600
Warner Losh <imp at bsdimp.com> schrieb:
> On Mon, Aug 20, 2018 at 1:45 PM, O. Hartmann <ohartmann at walstatt.org> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA512
> >
> > Am Mon, 20 Aug 2018 10:39:43 +0000 (UTC)
> > Alex Richardson <arichardson at FreeBSD.org> 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 bootstrap
> > >
> > > 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 order
> > > to allow building on non-FreeBSD systems where the headers in
> > > /usr/include/sys are usually completely incompatible with those in the
> > > 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
> > > ============================================================
> > ==================
> > > --- 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+= -L${WORLDTMP}/legacy/usr/lib
> > >
> > > # we do not want to capture dependencies referring to the above
> > > UPDATE_DEPENDFILE= 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 at freebsd.org mailing list
> > > https://lists.freebsd.org/mailman/listinfo/svn-src-head
> > > To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
> >
> >
> > This commit seems to break NanoBSD builds!
> >
> > While r338095 still build my NanoBSD obj tree, >= r338096 fails with:
> >
> > [...]
> > - --- obj_crunchdir_gbde ---
> > cd /pool/sources/CURRENT/src/rescue/rescue/../../sbin/gbde && MK_TESTS=no
> > UPDATE_DEPENDFILE=no _RECURSING_CRUNCH=1
> > MAKEOBJDIRPREFIX=/pool/nanobsd/amd64/ALERICH_amd64/
> > pool/sources/CURRENT/src/amd64.amd64/rescue/rescue
> > make MK_AUTO_OBJ=no DIRPRFX=rescue/rescue/gbde/ -DRESCUE
> > CRUNCH_CFLAGS=-DRESCUE
> > MK_AUTO_OBJ=no obj make[5]: "/pool/sources/CURRENT/src/
> > tools/build/mk/Makefile.boot"
> > line 18: 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 /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
So, how to explain r338095 works, r338096 doesn't?
- --
O. Hartmann
Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-----BEGIN PGP SIGNATURE-----
iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW3sd2QAKCRDS528fyFhY
lFveAf9Swvp4duDd7nh9MWgX3nEds/hFCO6viAJLGLZqRzJCA8rIbZKIRAh+31OD
ZqJ/ZZk9vEPQu2+f0o1YdbWzSQYZAf9x9CbjibmH5ZQ+O+BX0F3mAPdEhCsZu/fa
mp4TWV/EqwJeFRrk1T1CqfwS8+vMPk+S9+crW6ODINl/2oA5DFoK
=yjaP
-----END PGP SIGNATURE-----
More information about the svn-src-all
mailing list