]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path
authorJessica Clarke <jrtc27@FreeBSD.org>
Tue, 24 Aug 2021 13:55:31 +0000 (14:55 +0100)
committerJessica Clarke <jrtc27@FreeBSD.org>
Tue, 7 Sep 2021 12:08:18 +0000 (13:08 +0100)
commit92f73068bf695960c884a44bf31f972305f947bf
treedc985b2234ceaf292fe3350743b9ddf551497eb8
parent5ef9ae5c6d4fb10f89f34c81418d7d16a4afb115
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

(cherry picked from commit ab3a18095faebe306989f25288c44968f4144063)
Makefile.inc1