aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-03 14:28:15 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-03 14:28:15 +0100
commitec35c867d9da79368116e09fb787a846c3a8bdf8 (patch)
treedc95fe3829290efd58852c68229edde344fee193 /gcc/gcc.c
parent9ee0e809cd26d3cc9ff4c79d057a215379b4defc (diff)
downloadgcc-ec35c867d9da79368116e09fb787a846c3a8bdf8.zip
gcc-ec35c867d9da79368116e09fb787a846c3a8bdf8.tar.gz
gcc-ec35c867d9da79368116e09fb787a846c3a8bdf8.tar.bz2
backport: re PR sanitizer/84285 (Fail to statically link with -fsanitize=undefined)
Backported from mainline 2018-02-09 Jakub Jelinek <jakub@redhat.com> PR sanitizer/84285 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS, STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like -static-lib*san. From-SVN: r258187
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index b78a600..eced0d5 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -677,7 +677,7 @@ proper position among the other output files. */
#ifndef LIBASAN_SPEC
#define STATIC_LIBASAN_LIBS \
- " %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)}"
+ " %{static-libasan|static:%:include(libsanitizer.spec)%(link_libasan)}"
#ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -695,7 +695,7 @@ proper position among the other output files. */
#ifndef LIBTSAN_SPEC
#define STATIC_LIBTSAN_LIBS \
- " %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)}"
+ " %{static-libtsan|static:%:include(libsanitizer.spec)%(link_libtsan)}"
#ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -713,7 +713,7 @@ proper position among the other output files. */
#ifndef LIBLSAN_SPEC
#define STATIC_LIBLSAN_LIBS \
- " %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}"
+ " %{static-liblsan|static:%:include(libsanitizer.spec)%(link_liblsan)}"
#ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -731,7 +731,7 @@ proper position among the other output files. */
#ifndef LIBUBSAN_SPEC
#define STATIC_LIBUBSAN_LIBS \
- " %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}"
+ " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \
"} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \