From: H.J. Lu Date: Thu, 22 Nov 2012 15:17:21 +0000 (+0000) Subject: Issue an error for -static with fsanitize=address X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10dbfb3eb052e620e307acc774b07bc92e9bbc9b;p=gcc.git Issue an error for -static with fsanitize=address PR sanitizer/55379 * gcc.c (LINK_COMMAND_SPEC): Issue an error for -static with -fsanitize=address. From-SVN: r193728 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e976919573..63cb4f5cc2b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-11-22 H.J. Lu + + PR sanitizer/55379 + * gcc.c (LINK_COMMAND_SPEC): Issue an error for -static with + -fsanitize=address. + 2012-11-22 H.J. Lu * gcc.c (ADD_STATIC_LIBASAN_LIBS): New macro. Defined diff --git a/gcc/gcc.c b/gcc/gcc.c index 764ee1bf36f..ce5ab6136f3 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -703,7 +703,7 @@ proper position among the other output files. */ %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ - %{fsanitize=address:" LIBASAN_SPEC "}\ + %{fsanitize=address:" LIBASAN_SPEC "%{static:%ecannot specify -static with -fsanitize=address}}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" #endif