diff options
author | 2018-05-05 09:30:19 +0000 | |
---|---|---|
committer | 2018-05-05 09:30:19 +0000 | |
commit | c2478536621cb843dfe09ad92ed9b80bdd433d95 (patch) | |
tree | 6fc5da1fe911efc8b535f1bf5c1249b04489021c | |
parent | Set 'TODO' as a placeholder on next patchset release. (diff) | |
download | gentoo-c2478536621cb843dfe09ad92ed9b80bdd433d95.tar.gz gentoo-c2478536621cb843dfe09ad92ed9b80bdd433d95.tar.bz2 gentoo-c2478536621cb843dfe09ad92ed9b80bdd433d95.zip |
fix asan building on mips o32 ABI
In this case broken targets were:
cross-mips-unknown-linux-gnu/gcc
cross-mipsel-unknown-linux-gnu/gcc
Bug: https://gcc.gnu.org/PR85658
-rw-r--r-- | src/patchsets/gcc/8.1.0/gentoo/94_all_mips-o32-asan.patch | 37 | ||||
-rw-r--r-- | src/patchsets/gcc/8.1.0/gentoo/README.history | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/patchsets/gcc/8.1.0/gentoo/94_all_mips-o32-asan.patch b/src/patchsets/gcc/8.1.0/gentoo/94_all_mips-o32-asan.patch new file mode 100644 index 0000000000..0b14b6a1df --- /dev/null +++ b/src/patchsets/gcc/8.1.0/gentoo/94_all_mips-o32-asan.patch @@ -0,0 +1,37 @@ +Update O32 ABI pieces of sanitizer to make it compile again. + +https://gcc.gnu.org/bugzilla/PR85663 +diff --git a/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h b/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h +index a0605bbbd..253f7b5dc 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h ++++ b/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h +@@ -37,3 +37,3 @@ static struct { + char pad[32 - sizeof(int)]; +-} __attribute__((aligned(32))) lock = {0}; ++} __attribute__((aligned(32))) lock = {0, {0,}}; + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform.h b/libsanitizer/sanitizer_common/sanitizer_platform.h +index 1eb4d0c61..82875872c 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform.h +@@ -114,2 +114,11 @@ + # define SANITIZER_MIPS 1 ++# if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32 ++# define ONE_OF_MIPS_32_N32_64(a, b, c) (a) ++# elif defined(_MIPS_SIM) && _MIPS_SIM == _ABIN32 ++# define ONE_OF_MIPS_32_N32_64(a, b, c) (b) ++# elif defined(_MIPS_SIM) && _MIPS_SIM == _ABI64 ++# define ONE_OF_MIPS_32_N32_64(a, b, c) (c) ++# else ++# define ONE_OF_MIPS_32_N32_64(a, b, c) sanitizer_platform_unknown_sim ++# endif + # if defined(__mips64) +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 4d11d0717..4c6e13830 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -88,3 +88,3 @@ namespace __sanitizer { + SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) : +- FIRST_32_SECOND_64(160, 216); ++ ONE_OF_MIPS_32_N32_64(144, 160, 216); + const unsigned struct_kernel_stat64_sz = 104; diff --git a/src/patchsets/gcc/8.1.0/gentoo/README.history b/src/patchsets/gcc/8.1.0/gentoo/README.history index a5b1ce9e97..e8f0192ba7 100644 --- a/src/patchsets/gcc/8.1.0/gentoo/README.history +++ b/src/patchsets/gcc/8.1.0/gentoo/README.history @@ -1,5 +1,6 @@ 1.2 TODO + 93_all_arm-arch.patch + + 94_all_mips-o32-asan.patch 1.1 03 May 2018 U 13_all_default-ssp-fix.patch + 35_all_i386_libgcc_note.GNU-stack.patch |