[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann sbergman at redhat.com
Thu May 8 05:38:54 PDT 2014


 configure.ac |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit d15540c431587368d749b53074af25cf865e7a5f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 8 14:37:19 2014 +0200

    Prevent false positive configure check under Clang -fsanitize=address
    
    (at the expense of effectively disabling the check in that case, though)
    
    Change-Id: I57a0f4f815e8e8dac09e8695f3281504a6501569

diff --git a/configure.ac b/configure.ac
index 4811cd3..7f2e48e 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


More information about the Libreoffice-commits mailing list