]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bsd.lib.mk: Work around build system raciness
authorarichardson <arichardson@FreeBSD.org>
Thu, 26 Nov 2020 17:37:27 +0000 (17:37 +0000)
committerarichardson <arichardson@FreeBSD.org>
Thu, 26 Nov 2020 17:37:27 +0000 (17:37 +0000)
commit67a7d46cb7294c24c18d5a093196bc455fb50abf
treed5276f2aac322d17c6a31a62a5fa42ed6313ceb6
parentb52a79110c2fc2d657e681ff2f5316618b7181b4
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