git: ab3a18095fae - main - Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path
Jessica Clarke
jrtc27 at FreeBSD.org
Tue Aug 24 14:05:59 UTC 2021
The branch main has been updated by jrtc27:
URL: https://cgit.FreeBSD.org/src/commit/?id=ab3a18095faebe306989f25288c44968f4144063
commit ab3a18095faebe306989f25288c44968f4144063
Author: Jessica Clarke <jrtc27 at FreeBSD.org>
AuthorDate: 2021-08-24 13:55:31 +0000
Commit: Jessica Clarke <jrtc27 at FreeBSD.org>
CommitDate: 2021-08-24 14:04:25 +0000
Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path
Currently we override MK_CLANG_BOOTSTRAP to no so we don't build a
bootstrap compiler, but subdirectories don't see that and so the hack in
bsd.sys.mk to prefer our includes over Clang's resource dir for external
toolchains is not enabled unless you use -DWITHOUT_CLANG_BOOTSTRAP
explicitly on top of XCC (which tools/build/make.py does not do),
causing duplicate definition errors when building rtld-elf due to the
use of -ffreestanding (Clang's stdint.h will use the system one when
hosted, but its own when freestanding, and only has glibc's preprocessor
guards, not FreeBSD's).
This broke when dropping CLANG_BOOTSTRAP from BROKEN_OPTIONS.
Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux")
MFC after: 1 week
Reviewed by: imp, arichardson
Differential Revision: https://reviews.freebsd.org/D31529
---
Makefile.inc1 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 5bb2412e4042..604fef201c48 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -93,6 +93,9 @@ X${COMPILER}?= ${${COMPILER}}
# a cross compiler.
.if ${XCC:N${CCACHE_BIN}:M/*}
MK_CLANG_BOOTSTRAP= no
+# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to
+# work around incompatible headers in Clang's resource directory is enabled.
+.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP
.endif
# Pull in compiler metadata from buildworld/toolchain if possible to avoid
More information about the dev-commits-src-all
mailing list