aboutsummaryrefslogtreecommitdiff
blob: 0b14b6a1df43e74e2b77f61a64e71420004e7a87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;