diff options
| -rw-r--r-- | recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 37 | ||||
| -rw-r--r-- | recipes-devtools/clang/common.inc | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch new file mode 100644 index 0000000..8648736 --- /dev/null +++ b/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 2030455a866828bb6d5f03e901e1147dacd95ed5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 31 Dec 2022 15:03:24 -0800 | ||
| 4 | Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS on | ||
| 5 | linux | ||
| 6 | |||
| 7 | On 32bit systems using 64bit time_t build fails because | ||
| 8 | _FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64 | ||
| 9 | |||
| 10 | Fixes | ||
| 11 | /usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed | ||
| 12 | only with _FILE_OFFSET_BITS=64" | ||
| 13 | | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" | ||
| 14 | | ^ | ||
| 15 | | 1 error generated. | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [https://reviews.llvm.org/D140812] | ||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | --- | ||
| 20 | .../lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 1 + | ||
| 21 | 1 file changed, 1 insertion(+) | ||
| 22 | |||
| 23 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
| 24 | index 4e0d428d3284..9e646500350b 100644 | ||
| 25 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
| 26 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
| 27 | @@ -18,6 +18,7 @@ | ||
| 28 | // depends on _FILE_OFFSET_BITS setting. | ||
| 29 | // To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. | ||
| 30 | #undef _FILE_OFFSET_BITS | ||
| 31 | +#undef _TIME_BITS | ||
| 32 | #endif | ||
| 33 | |||
| 34 | // Must go after undef _FILE_OFFSET_BITS. | ||
| 35 | -- | ||
| 36 | 2.39.0 | ||
| 37 | |||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index db5463c..fe27306 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
| @@ -45,6 +45,7 @@ SRC_URI = "\ | |||
| 45 | file://0033-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch \ | 45 | file://0033-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch \ |
| 46 | file://0034-Revert-MIPS-compiler-rt-Fix-stat-struct-s-size-for-O.patch \ | 46 | file://0034-Revert-MIPS-compiler-rt-Fix-stat-struct-s-size-for-O.patch \ |
| 47 | file://0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch \ | 47 | file://0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch \ |
| 48 | file://0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ | ||
| 48 | " | 49 | " |
| 49 | # Fallback to no-PIE if not set | 50 | # Fallback to no-PIE if not set |
| 50 | GCCPIE ??= "" | 51 | GCCPIE ??= "" |
