llvm-project/compiler-rt/lib
Tobias Burnus 6f095babc2 sanitizer_common: Define FP_XSTATE_MAGIC1 for old glibc
D116208 (commit 1298273e82) added FP_XSTATE_MAGIC1.
However, when building with glibc < 2.16 for backward-dependency
compatibility, it is not defined - and the build breaks.

Note: The define comes from Linux's asm/sigcontext.h but the
file uses signal.h which includes glibc's bits/sigcontext.h - which
is synced from the kernel's file but lags behind.

Solution: For backward compatility with ancient systems, define
FP_XSTATE_MAGIC1 if undefined.

//For the old systems, we were building with Linux kernel 3.19 but to support really old glibc systems, we build with a sysroot of glibc 2.12. While our kernel (and the users' kernels) have FP_XSTATE_MAGIC1, glibc 2.12 is too old. – With this patch, building the sanitizer libs works again. This showed up for us today as GCC mainline/13 has now synced the sanitizer libs.//

Reviewed By: #sanitizers, vitalybuka

Differential Revision: https://reviews.llvm.org/D124927
2022-05-05 11:05:27 +01:00
..
BlocksRuntime
asan [asan] Enable detect_stack_use_after_return=1 by default on Linux 2022-04-28 21:08:16 -07:00
builtins [compiler-rt][AVR] Fix avr_SOURCES CMake variable 2022-05-05 02:29:04 +02:00
cfi sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
crt Revert "[compiler-rt] Use C_STANDARD instead of custom logic for adding -std=c11" 2022-04-27 00:20:44 +03:00
dfsan [DFSan] Print an error before calling null extern_weak functions, incase dfsan instrumentation optimized out a null check. 2022-04-19 17:01:41 -07:00
fuzzer Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
gwp_asan Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
hwasan [HWASan] cleanup imports in hwasan_symbolize. 2022-05-04 11:22:36 -07:00
interception Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
lsan [NFC][sanitizer] Consolidate malloc hook invocations 2022-04-12 20:08:29 -07:00
memprof [NFC][sanitizer] Consolidate malloc hook invocations 2022-04-12 20:08:29 -07:00
msan [msan] Set poison_in_dtor=1 by default 2022-04-15 14:40:23 -07:00
orc Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
profile [AIX][PGO] Enable linux style PGO on AIX 2022-05-05 04:10:39 +00:00
safestack Revert "sanitizers: increase .clang-format columns to 100" 2021-07-28 09:40:21 +02:00
sanitizer_common sanitizer_common: Define FP_XSTATE_MAGIC1 for old glibc 2022-05-05 11:05:27 +01:00
scudo [scudo] Disable memory tagging on arm64_32 2022-04-21 17:22:10 -07:00
stats [compiler-rt] separate lsan, ubsan, stats configuration from SANITIZER_COMMON_SUPPORTED_OS 2021-11-10 19:16:20 -08:00
tsan tsan: fix GCC warnings 2022-05-04 10:22:03 +02:00
ubsan Revert "[ubsan] Simplify ubsan_GetStackTrace" 2022-04-13 10:41:23 +02:00
ubsan_minimal [compiler-rt] separate lsan, ubsan, stats configuration from SANITIZER_COMMON_SUPPORTED_OS 2021-11-10 19:16:20 -08:00
xray [PowerPC] Fix sanitizers build on FreeBSD 2022-04-18 07:16:13 -05:00
CMakeLists.txt Revert D120327 "compiler-rt: Add udivmodei5 to builtins and add bitint library" 2022-04-08 12:39:42 -07:00