diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-11-29 13:30:36 +0100 |
---|---|---|
committer | Yury Gribov <ygribov@gcc.gnu.org> | 2013-11-29 12:30:36 +0000 |
commit | 35814b034651b543b2521f9bd028c35f1fcaac1a (patch) | |
tree | 0cc2ab434efd00fd5b66854aa66871625d4c011b /gcc/gcc.c | |
parent | 08c5a7c685a97e0870fe278a1113523763b7af5f (diff) | |
download | gcc-35814b034651b543b2521f9bd028c35f1fcaac1a.zip gcc-35814b034651b543b2521f9bd028c35f1fcaac1a.tar.gz gcc-35814b034651b543b2521f9bd028c35f1fcaac1a.tar.bz2 |
re PR sanitizer/59063 (ASAN: segfault in __interceptor_clock_gettime)
gcc/
2013-11-29 Jakub Jelinek <jakub@redhat.com>
Yury Gribov <y.gribov@samsung.com>
PR sanitizer/59063
* config/gnu-user.h: Removed old code for setting up sanitizer
libs.
* gcc.c: Using libsanitizer spec instead of explicit libs.
gcc/testsuite/
2013-11-29 Jakub Jelinek <jakub@redhat.com>
Yury Gribov <y.gribov@samsung.com>
PR sanitizer/59063
* c-c++-common/asan/pr59063-1.c: New test.
* c-c++-common/asan/pr59063-2.c: Likewise.
* lib/asan-dg.exp: Add path to libsanitizer.spec to cflags.
* lib/ubsan-dg.exp: Likewise.
libsanitizer/
2013-11-29 Jakub Jelinek <jakub@redhat.com>
Yury Gribov <y.gribov@samsung.com>
PR sanitizer/59063
* libsanitizer.spec.in: Add spec file to hold link flags for
various sanitizer libs.
* configure.ac: Check whether clock_* routines come from librt.
* asan/Makefile.am (libasan_la_LDFLAGS): Libs now come from
configure.ac.
* tsan/Makefile.am (libtsan_la_LDFLAGS): Likewise.
* ubsan/Makefile.am (libubsan_la_LDFLAGS): Likewise.
* lsan/Makefile.am (liblsan_la_LDFLAGS): Likewise.
* asan/Makefile.in: Regenerate.
* interception/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
Co-Authored-By: Yury Gribov <y.gribov@samsung.com>
From-SVN: r205524
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 52 |
1 files changed, 18 insertions, 34 deletions
@@ -535,20 +535,16 @@ proper position among the other output files. */ #define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}" #ifndef LIBASAN_SPEC -#ifdef STATIC_LIBASAN_LIBS -#define ADD_STATIC_LIBASAN_LIBS \ - " %{static-libasan:" STATIC_LIBASAN_LIBS "}" -#else -#define ADD_STATIC_LIBASAN_LIBS -#endif +#define STATIC_LIBASAN_LIBS \ + " %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)}" #ifdef LIBASAN_EARLY_SPEC -#define LIBASAN_SPEC ADD_STATIC_LIBASAN_LIBS +#define LIBASAN_SPEC STATIC_LIBASAN_LIBS #elif defined(HAVE_LD_STATIC_DYNAMIC) #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \ "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \ - ADD_STATIC_LIBASAN_LIBS + STATIC_LIBASAN_LIBS #else -#define LIBASAN_SPEC "-lasan" ADD_STATIC_LIBASAN_LIBS +#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS #endif #endif @@ -557,20 +553,16 @@ proper position among the other output files. */ #endif #ifndef LIBTSAN_SPEC -#ifdef STATIC_LIBTSAN_LIBS -#define ADD_STATIC_LIBTSAN_LIBS \ - " %{static-libtsan:" STATIC_LIBTSAN_LIBS "}" -#else -#define ADD_STATIC_LIBTSAN_LIBS -#endif +#define STATIC_LIBTSAN_LIBS \ + " %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)}" #ifdef LIBTSAN_EARLY_SPEC -#define LIBTSAN_SPEC ADD_STATIC_LIBTSAN_LIBS +#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS #elif defined(HAVE_LD_STATIC_DYNAMIC) #define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \ "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ - ADD_STATIC_LIBTSAN_LIBS + STATIC_LIBTSAN_LIBS #else -#define LIBTSAN_SPEC "-ltsan" ADD_STATIC_LIBTSAN_LIBS +#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS #endif #endif @@ -579,34 +571,26 @@ proper position among the other output files. */ #endif #ifndef LIBLSAN_SPEC -#ifdef STATIC_LIBLSAN_LIBS -#define ADD_STATIC_LIBLSAN_LIBS \ - " %{static-liblsan:" STATIC_LIBLSAN_LIBS "}" -#else -#define ADD_STATIC_LIBLSAN_LIBS -#endif +#define STATIC_LIBLSAN_LIBS \ + " %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}" #ifdef HAVE_LD_STATIC_DYNAMIC #define LIBLSAN_SPEC "%{!shared:%{static-liblsan:" LD_STATIC_OPTION \ "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ - ADD_STATIC_LIBLSAN_LIBS "}" + STATIC_LIBLSAN_LIBS "}" #else -#define LIBLSAN_SPEC "%{!shared:-llsan" ADD_STATIC_LIBLSAN_LIBS "}" +#define LIBLSAN_SPEC "%{!shared:-llsan" STATIC_LIBLSAN_LIBS "}" #endif #endif #ifndef LIBUBSAN_SPEC -#ifdef STATIC_LIBUBSAN_LIBS -#define ADD_STATIC_LIBUBSAN_LIBS \ - " %{static-libubsan:" STATIC_LIBUBSAN_LIBS "}" -#else -#define ADD_STATIC_LIBUBSAN_LIBS -#endif +#define STATIC_LIBUBSAN_LIBS \ + " %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}" #ifdef HAVE_LD_STATIC_DYNAMIC #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \ "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ - ADD_STATIC_LIBUBSAN_LIBS + STATIC_LIBUBSAN_LIBS #else -#define LIBUBSAN_SPEC "-lubsan" ADD_STATIC_LIBUBSAN_LIBS +#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS #endif #endif |