diff options
author | Max Ostapenko <m.ostapenko@partner.samsung.com> | 2015-10-22 12:47:17 +0300 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2015-10-22 12:47:17 +0300 |
commit | 692b1131a7cc0c5bfa3137a6489b4ef9715b635e (patch) | |
tree | b707a17b008e0a523dd80cc5934ebfd02843aad6 /libsanitizer/configure.ac | |
parent | a8fc25795155d4c4d18c8c5b099748a8178b38f6 (diff) | |
download | gcc-692b1131a7cc0c5bfa3137a6489b4ef9715b635e.zip gcc-692b1131a7cc0c5bfa3137a6489b4ef9715b635e.tar.gz gcc-692b1131a7cc0c5bfa3137a6489b4ef9715b635e.tar.bz2 |
Fix bootstrap on x86_64-apple-darwin14 after r229119.
libsanitizer/
PR bootstrap/68041
* configure.ac (link_sanitizer_common): Link against librt only if it
contains shm_open, required by sanitizers.
(CXX_ABI_NEEDED): Remove variable.
* configure: Regenerate.
* ubsan/Makefile.am (libubsan_la_LIBADD): Do not add -lc++abi anymore.
* ubsan/Makefile.in: Regenerate.
From-SVN: r229168
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r-- | libsanitizer/configure.ac | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index ece15ed..81fd46d 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -96,7 +96,13 @@ AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"]) AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime) # Common libraries that we need to link against for all sanitizer libs. -link_sanitizer_common='-lrt -lpthread -ldl -lm' +link_sanitizer_common='-lpthread -ldl -lm' + +# At least for glibc, shm_open is in librt. But don't pull that +# in if it still doesn't give us the function we want. This +# test is copied from libgomp. +AC_CHECK_LIB(rt, shm_open, + [link_sanitizer_common="-lrt $link_sanitizer_common"]) # Set up the set of additional libraries that we need to link against for libasan. link_libasan=$link_sanitizer_common @@ -114,12 +120,21 @@ AC_SUBST(link_libubsan) link_liblsan=$link_sanitizer_common AC_SUBST(link_liblsan) + +# At least for glibc, clock_gettime is in librt. But don't pull that +# in if it still doesn't give us the function we want. This +# test is copied from libgomp. +AC_CHECK_LIB(rt, clock_gettime, + [link_libasan="-lrt $link_libasan" +link_libtsan="-lrt $link_libtsan" +# Other sanitizers do not override clock_* API +]) + case "$host" in - *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ; CXX_ABI_NEEDED=true ;; - *) MAC_INTERPOSE=false ; CXX_ABI_NEEDED=false ;; + *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; + *) MAC_INTERPOSE=false ;; esac AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) -AM_CONDITIONAL(USE_CXX_ABI_FLAG, $CXX_ABI_NEEDED) backtrace_supported=yes |