diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-08 14:37:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-08 14:37:19 +0200 |
commit | d15540c431587368d749b53074af25cf865e7a5f (patch) | |
tree | 066ad761b69e21432214300fce8db86e984696c5 | |
parent | eae3f52f94f2ce3633539ad782d5c1e768c52089 (diff) |
Prevent false positive configure check under Clang -fsanitize=address
(at the expense of effectively disabling the check in that case, though)
Change-Id: I57a0f4f815e8e8dac09e8695f3281504a6501569
-rw-r--r-- | configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 4811cd300437..7f2e48ebe665 100644 --- a/configure.ac +++ b/configure.ac @@ -6522,7 +6522,20 @@ _ACEOF if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then gccvisinlineshiddenok=no else - if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $LINKFLAGSNOUNDEFS -o libconftest2$DLLPOST >/dev/null 2>&5; then + dnl At least Clang -fsanitize=address is known to not work with + dnl -z defs (unsetting which makes the test moot, though): + my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS + if test "$COM_GCC_IS_CLANG" = TRUE; then + for i in $CXX; do + case $i in + -fsanitize=address) + my_linkflagsnoundefs= + break + ;; + esac + done + fi + if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then gccvisinlineshiddenok=no fi fi |