cannelloni: needs dynamic library
[buildroot-gz.git] / package / gcc / 4.9.3 / 140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
blob55f32288f5e06113dbee24c0b83118bd1991e33b
1 From 3c536954a67a883630f4a7513a27f02a892c3dcb Mon Sep 17 00:00:00 2001
2 From: Evgeniy Stepanov <eugeni.stepanov@gmail.com>
3 Date: Tue, 21 Oct 2014 21:08:13 +0000
4 Subject: [PATCH] [sanitizer] Fix build with _FILE_OFFSET_BITS=64.
6 Sanitizer source is not affected by _FILE_OFFSET_BITS in general,
7 but this one file must be built with 32-bit off_t. More details in the code.
9 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220328 91177308-0d34-0410-b5e6-96231b3b80d8
10 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
11 ---
12 lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 8 ++++++++
13 1 file changed, 8 insertions(+)
15 diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
16 index bbc1108..fc09522 100644
17 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
18 +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
19 @@ -13,7 +13,15 @@
21 #include "sanitizer_platform.h"
22 #if SANITIZER_LINUX || SANITIZER_MAC
23 +// Tests in this file assume that off_t-dependent data structures match the
24 +// libc ABI. For example, struct dirent here is what readdir() function (as
25 +// exported from libc) returns, and not the user-facing "dirent", which
26 +// depends on _FILE_OFFSET_BITS setting.
27 +// To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below.
28 +#ifdef _FILE_OFFSET_BITS
29 +#undef _FILE_OFFSET_BITS
30 +#endif
32 #include "sanitizer_internal_defs.h"
33 #include "sanitizer_platform_limits_posix.h"
35 --
36 2.1.4