Page MenuHomeFreeBSD

Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path
ClosedPublic

Authored by jrtc27 on Aug 13 2021, 5:56 PM.
Tags
None
Referenced Files
F86253593: D31529.id93652.diff
Mon, Jun 17, 4:57 PM
Unknown Object (File)
Sun, Jun 16, 2:19 PM
Unknown Object (File)
Thu, Jun 13, 10:38 AM
Unknown Object (File)
Thu, May 23, 4:53 PM
Unknown Object (File)
Tue, May 21, 2:39 AM
Unknown Object (File)
May 7 2024, 8:49 AM
Unknown Object (File)
Apr 26 2024, 12:49 AM
Unknown Object (File)
Apr 25 2024, 11:30 PM
Subscribers
None

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41025
Build 37914: arc lint + arc unit