aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/gnu-user.h2
-rw-r--r--gcc/gcc.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b898915..2a609fe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/84250
+ * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
+ libasan.
+ * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
+
2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86380
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index cba3c0b..ccae957 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -161,7 +161,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
"%{static-libasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION " -lstdc++ }}%{!static-libasan:-lasan}"
#undef LIBTSAN_EARLY_SPEC
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9ed8a03..51b7a55 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -993,7 +993,7 @@ proper position among the other output files. */
%{static:%ecannot specify -static with -fsanitize=address}}\
%{%:sanitize(thread):" LIBTSAN_SPEC "\
%{static:%ecannot specify -static with -fsanitize=thread}}\
- %{%:sanitize(undefined):" LIBUBSAN_SPEC "}\
+ %{!%:sanitize(address):%{%:sanitize(undefined):" LIBUBSAN_SPEC "}}\
%{%:sanitize(leak):" LIBLSAN_SPEC "}}}"
#endif