diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-05-05 09:30:19 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-05-05 09:30:19 +0000 |
commit | d50b040f10aa951438b8beddaae65dc9cf712623 (patch) | |
tree | 61281488c9e63e2f297294c98cea268544aaa22d /8.1.0 | |
parent | Set 'TODO' as a placeholder on next patchset release. (diff) | |
download | gcc-patches-d50b040f10aa951438b8beddaae65dc9cf712623.tar.gz gcc-patches-d50b040f10aa951438b8beddaae65dc9cf712623.tar.bz2 gcc-patches-d50b040f10aa951438b8beddaae65dc9cf712623.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
Diffstat (limited to '8.1.0')
-rw-r--r-- | 8.1.0/gentoo/94_all_mips-o32-asan.patch | 37 | ||||
-rw-r--r-- | 8.1.0/gentoo/README.history | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/8.1.0/gentoo/94_all_mips-o32-asan.patch b/8.1.0/gentoo/94_all_mips-o32-asan.patch new file mode 100644 index 0000000..0b14b6a --- /dev/null +++ b/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/8.1.0/gentoo/README.history b/8.1.0/gentoo/README.history index a5b1ce9..e8f0192 100644 --- a/8.1.0/gentoo/README.history +++ b/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 |