linux64.h (ASAN_REJECT_SPEC): New macro.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 2 Apr 2019 07:40:30 +0000 (07:40 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 2 Apr 2019 07:40:30 +0000 (07:40 +0000)
* config/sparc/linux64.h (ASAN_REJECT_SPEC): New macro.
(ASAN_CC1_SPEC): Use it in 64-bit mode.
* config/sparc/sol2.h (ASAN_REJECT_SPEC): Remove superfluous colon.

From-SVN: r270075

gcc/ChangeLog
gcc/config/sparc/linux64.h
gcc/config/sparc/sol2.h

index 7b745c611935bbc3446225dd195d424b6a1bd8e6..21fa2846be6556aa3e5a5f8ab6a0c3b1a071355d 100644 (file)
@@ -1,3 +1,9 @@
+2019-04-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config/sparc/linux64.h (ASAN_REJECT_SPEC): New macro.
+       (ASAN_CC1_SPEC): Use it in 64-bit mode.
+       * config/sparc/sol2.h (ASAN_REJECT_SPEC): Remove superfluous colon.
+
 2019-04-01  Andrey Belevantsev  <abel@ispras.ru>
 
        PR rtl-optimization/85412
index bbf5bab3b40927c1257bfc302d4dafc4f924b165..789d1df4bd505aef80fcf4e9b6d7763708e49e40 100644 (file)
@@ -143,8 +143,18 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 
 #define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
 
+/* -fsanitize=address is currently only supported for 32-bit.  */
+#define ASAN_REJECT_SPEC \
+  "%{!%:sanitize(thread):%e-fsanitize=address is not supported in this configuration}"
+
 #undef  ASAN_CC1_SPEC
-#define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+#if DEFAULT_ARCH32_P
+#define ASAN_CC1_SPEC \
+  "%{%:sanitize(address):-funwind-tables %{m64:" ASAN_REJECT_SPEC "}}"
+#else
+#define ASAN_CC1_SPEC \
+  "%{%:sanitize(address):-funwind-tables %{!m32:" ASAN_REJECT_SPEC "}}"
+#endif
 
 #undef  CC1_SPEC
 #if DEFAULT_ARCH32_P
index c78661f20890f14df9c191d5fbf9650205a37c3b..934047570540d4e16ce48c6b600392bfcbeddf1b 100644 (file)
@@ -324,7 +324,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 
 /* -fsanitize=address is currently only supported for 32-bit.  */
 #define ASAN_REJECT_SPEC \
-  DEF_ARCH64_SPEC("%e:-fsanitize=address is not supported in this configuration")
+  DEF_ARCH64_SPEC("%e-fsanitize=address is not supported in this configuration")
 \f
 
 /* Register the Solaris-specific #pragma directives.  */