Commit 9abed7fa by Jakub Jelinek Committed by Jakub Jelinek

re PR sanitizer/84285 (Fail to statically link with -fsanitize=undefined)

	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: r257515
parent e47aebb3
2018-02-09 Jakub Jelinek <jakub@redhat.com> 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.
PR debug/84252 PR debug/84252
* var-tracking.c (vt_add_function_parameter): Punt for non-onepart * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
PARALLEL incoming that failed vt_get_decl_and_offset check. PARALLEL incoming that failed vt_get_decl_and_offset check.
......
...@@ -684,7 +684,7 @@ proper position among the other output files. */ ...@@ -684,7 +684,7 @@ proper position among the other output files. */
#ifndef LIBASAN_SPEC #ifndef LIBASAN_SPEC
#define STATIC_LIBASAN_LIBS \ #define STATIC_LIBASAN_LIBS \
" %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)}" " %{static-libasan|static:%:include(libsanitizer.spec)%(link_libasan)}"
#ifdef LIBASAN_EARLY_SPEC #ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS #define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC) #elif defined(HAVE_LD_STATIC_DYNAMIC)
...@@ -702,7 +702,7 @@ proper position among the other output files. */ ...@@ -702,7 +702,7 @@ proper position among the other output files. */
#ifndef LIBTSAN_SPEC #ifndef LIBTSAN_SPEC
#define STATIC_LIBTSAN_LIBS \ #define STATIC_LIBTSAN_LIBS \
" %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)}" " %{static-libtsan|static:%:include(libsanitizer.spec)%(link_libtsan)}"
#ifdef LIBTSAN_EARLY_SPEC #ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC) #elif defined(HAVE_LD_STATIC_DYNAMIC)
...@@ -720,7 +720,7 @@ proper position among the other output files. */ ...@@ -720,7 +720,7 @@ proper position among the other output files. */
#ifndef LIBLSAN_SPEC #ifndef LIBLSAN_SPEC
#define STATIC_LIBLSAN_LIBS \ #define STATIC_LIBLSAN_LIBS \
" %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}" " %{static-liblsan|static:%:include(libsanitizer.spec)%(link_liblsan)}"
#ifdef LIBLSAN_EARLY_SPEC #ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC) #elif defined(HAVE_LD_STATIC_DYNAMIC)
...@@ -738,7 +738,7 @@ proper position among the other output files. */ ...@@ -738,7 +738,7 @@ proper position among the other output files. */
#ifndef LIBUBSAN_SPEC #ifndef LIBUBSAN_SPEC
#define STATIC_LIBUBSAN_LIBS \ #define STATIC_LIBUBSAN_LIBS \
" %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}" " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC #ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \ #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \
"} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment