]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bsd.lib.mk: Work around build system raciness
authorAlex Richardson <arichardson@FreeBSD.org>
Thu, 26 Nov 2020 17:37:27 +0000 (17:37 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Thu, 26 Nov 2020 17:37:27 +0000 (17:37 +0000)
commitdabbf11f97b43ced7dd218eba5961c40cc7b7deb
treed5276f2aac322d17c6a31a62a5fa42ed6313ceb6
parentacf87920672f88e8bed39b758a5eb2e716548652
bsd.lib.mk: Work around build system raciness

We are seeing regular build failures due to libc.so being installed again and
another parallel make job tries to read the partially written libc.so at the
same time. When building with -j32 or higher this almost always happens on
the first clean build (subsequent incremental builds always work fine).
Using -S should "fix" the "section header table goes past the end of the
file: e_shoff = 0x..." errors that have started to plague our builds.

We originally thought this only affected CheriBSD, but I just got the same
error while building the latest upstream FreeBSD.

The real fix should be to not install libraries twice, but until then this
workaround is needed.

Original patch by jrtc27@, I only made some minor changes to the comment.

Obtained from: CheriBSD (https://github.com/CTSRD-CHERI/cheribsd/commit/49837edd3efd5d02a1b120c47f00cfc2d59a9a8e)
Reviewed By: markj, bdrewery
Differential Revision: https://reviews.freebsd.org/D27102
share/mk/bsd.lib.mk