llvm-project/compiler-rt
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
..
cmake [compiler-rt][builtins] Add several helper functions for AVR 2022-05-02 01:27:46 +00:00
docs Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
include [memprof] Initialize MemInfoBlock data. 2022-03-22 14:35:57 -07:00
lib sanitizer_common: Define FP_XSTATE_MAGIC1 for old glibc 2022-05-05 11:05:27 +01:00
test Revert "tsan: model atomic read for failing CAS" 2022-05-02 22:26:56 -07:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [Darwin] Limit parallelism for sanitizer tests that use shadow memory on AS 2022-03-31 14:43:28 -07:00
utils [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
www [compiler-rt] Remove forgotten mention of SVN modules, LLVM now uses Git. 2022-03-23 15:29:30 +01:00
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [runtimes] [CMake] Unify variable names 2022-04-24 13:06:36 +03:00
CODE_OWNERS.TXT CODE_OWNERS: update information for builtins 2022-04-25 15:36:52 +00:00
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================