]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10177 fix back-perl build for clang15 or later
authorHAMANO Tsukasa <hamano@osstech.co.jp>
Wed, 14 Feb 2024 06:18:08 +0000 (15:18 +0900)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 22 Feb 2024 16:46:55 +0000 (16:46 +0000)
Remove problematic and unnecessary compile flags.

configure.ac

index 49fd54c7b3ec18af1321c5146a9863d3660a697e..e941fe7dbbe149d61e2f688ef24a11b621f421bc 100644 (file)
@@ -716,8 +716,22 @@ if test $ol_enable_perl != no ; then
                fi
 
        else
-               PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
-               PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
+               PERL_CPPFLAGS=""
+               for opt in `$PERLBIN -MExtUtils::Embed -e ccopts`; do
+                       case "$opt" in
+                       "-flto=auto" | "-Wall" )
+                               continue;;
+                       esac
+                       PERL_CPPFLAGS="$PERL_CPPFLAGS $opt"
+               done
+               PERL_LDFLAGS=""
+               for opt in `$PERLBIN" -MExtUtils::Embed -e ldopts`; do
+                       case "$opt" in
+                       "-lc" )
+                               continue;;
+                       esac
+                       PERL_LDFLAGS="$PERL_LDFLAGS $opt"
+               done
 
                if test x"$ol_enable_perl" = "xyes" ; then
                        SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"