diff options
author | Andreas Tobler <andreast@gcc.gnu.org> | 2016-01-14 21:27:49 +0100 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2016-01-14 21:27:49 +0100 |
commit | bf93d5436362a54beae93703618cf9ac47c06a19 (patch) | |
tree | 92f1ce1f067dd71e382bc2344c00514b5bb404f0 /libsanitizer/configure.ac | |
parent | e6d6ec9e06d6512732941c86464d8c5852928432 (diff) | |
download | gcc-bf93d5436362a54beae93703618cf9ac47c06a19.zip gcc-bf93d5436362a54beae93703618cf9ac47c06a19.tar.gz gcc-bf93d5436362a54beae93703618cf9ac47c06a19.tar.bz2 |
configure.ac: Replace the hard-coded -ldl requirement for link_sanitizer_common with a...
2016-01-14 Andreas Tobler <andreast@gcc.gnu.org>
* configure.ac: Replace the hard-coded -ldl requirement for
link_sanitizer_common with a configure time check for -ldl.
* configure: Regenerate.
From-SVN: r232385
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r-- | libsanitizer/configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index 72b13a1..063b1d6 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -96,7 +96,7 @@ 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='-lpthread -ldl -lm' +link_sanitizer_common='-lpthread -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 @@ -104,6 +104,10 @@ link_sanitizer_common='-lpthread -ldl -lm' AC_CHECK_LIB(rt, shm_open, [link_sanitizer_common="-lrt $link_sanitizer_common"]) +# Do a configure time check for -ldl +AC_CHECK_LIB(dl, dlsym, + [link_sanitizer_common="-ldl $link_sanitizer_common"]) + # Set up the set of additional libraries that we need to link against for libasan. link_libasan=$link_sanitizer_common AC_SUBST(link_libasan) |