]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tools/build/cross-build: Fix building libllvmminimal on Linux
authorJessica Clarke <jrtc27@FreeBSD.org>
Thu, 12 Aug 2021 22:50:48 +0000 (23:50 +0100)
committerJessica Clarke <jrtc27@FreeBSD.org>
Thu, 12 Aug 2021 22:50:48 +0000 (23:50 +0100)
commit8a1895a3fa6f634e9f459b6b62321a61c7941bdc
tree59e809829b89f5c6becf2feadc30939ad8a9e1c4
parentcef65082ae12aabaac176a61ffc49f37c97a58c3
tools/build/cross-build: Fix building libllvmminimal on Linux

There is a __used member in glibc's posix_spawn_file_actions_t in
spawn.h, so we must temporarily undefine __used when including it,
otherwise Support/Unix/Program.inc fails to build. This is based on
similar handling for __unused in other headers.

Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux")
MFC after: 1 week
tools/build/cross-build/include/linux/__used_workaround_end.h [new file with mode: 0644]
tools/build/cross-build/include/linux/__used_workaround_start.h [new file with mode: 0644]
tools/build/cross-build/include/linux/spawn.h [new file with mode: 0644]