Commit 03d670c8 by H.J. Lu Committed by H.J. Lu

Add STATIC_LIBASAN_LIBS for -static-libasan

	* gcc.c (ADD_STATIC_LIBASAN_LIBS): New macro.  Defined
	with STATIC_LIBASAN_LIBS.
	(LIBASAN_SPEC): Add STATIC_LIBASAN_LIBS.
	* config/gnu-user.h (STATIC_LIBASAN_LIBS): New macro.

From-SVN: r193725
parent 099f2693
2012-11-22 H.J. Lu <hongjiu.lu@intel.com>
* gcc.c (ADD_STATIC_LIBASAN_LIBS): New macro. Defined
with STATIC_LIBASAN_LIBS.
(LIBASAN_SPEC): Add STATIC_LIBASAN_LIBS.
* config/gnu-user.h (STATIC_LIBASAN_LIBS): New macro.
2012-11-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2012-11-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (*arm_abssi2): Define predicable attribute. * config/arm/arm.md (*arm_abssi2): Define predicable attribute.
...@@ -98,3 +98,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -98,3 +98,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS 1
#define TARGET_HAS_SINCOS 1 #define TARGET_HAS_SINCOS 1
/* Additional libraries needed by -static-libasan. */
#undef STATIC_LIBASAN_LIBS
#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
...@@ -545,11 +545,18 @@ proper position among the other output files. */ ...@@ -545,11 +545,18 @@ proper position among the other output files. */
#define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}" #define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}"
#ifndef LIBASAN_SPEC #ifndef LIBASAN_SPEC
#ifdef STATIC_LIBASAN_LIBS
#define ADD_STATIC_LIBASAN_LIBS \
" %{static-libasan:" STATIC_LIBASAN_LIBS "}"
#else
#define ADD_STATIC_LIBASAN_LIBS
#endif
#ifdef HAVE_LD_STATIC_DYNAMIC #ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \ #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \
"} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \
ADD_STATIC_LIBASAN_LIBS
#else #else
#define LIBASAN_SPEC "-lasan" #define LIBASAN_SPEC "-lasan" ADD_STATIC_LIBASAN_LIBS
#endif #endif
#endif #endif
......
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