]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0408: configure fails on Fedora when including perl v9.1.0408
authorChristian Brabandt <cb@256bit.org>
Sat, 11 May 2024 18:18:21 +0000 (20:18 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 11 May 2024 18:22:32 +0000 (20:22 +0200)
Problem:  configure fails on Fedora when including perl
          (chesheer-smile)
Solution: Filter out -spec=<path> from $LIBS and $LDFLAGS to avoid
          linking relocation errors for unrelated autoconf tests.

closes: #14526

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/auto/configure
src/configure.ac
src/version.c

index 0e0cf8efed4de17325f3580c512a512c83966daf..8433133c611e3a85790ea71dec2ef3b38918cf0d 100755 (executable)
@@ -6502,11 +6502,13 @@ printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
                -e 's/-flto\(=auto\)\? //' \
                -e 's/-W[^ ]*//g' \
                -e 's/-D_FORTIFY_SOURCE=.//g'`
-            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
+                  perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
                sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
+                       -e 's/-specs=[^ ]*//g' \
                        -e 's/-bE:perl.exp//' -e 's/-lc //'`
-                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
-               -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
+                        perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
+               -e 'ccdlflags' | sed -e 's/-bE:perl.exp//' \
+               -e 's/-specs=[^ ]*//g' `
 
                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
 printf %s "checking if compile and link flags for Perl are sane... " >&6; }
index f6e54b30b06de85f8b80a6ac34b8fac19c548baa..e092f686a600a3edc0465a73dd56bc8c524fdd1d 100644 (file)
@@ -1173,13 +1173,17 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
                -e 's/-W[[^ ]]*//g' \
                -e 's/-D_FORTIFY_SOURCE=.//g'`
       dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
+      dnl Remove -specs=<file-path>, the hardened flags cause relocation errors
       perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
                sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
+                       -e 's/-specs=[[^ ]*]//g' \
                        -e 's/-bE:perl.exp//' -e 's/-lc //'`
       dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH
       dnl a test in configure may fail because of that.
+      dnl Remove -specs=<file-path>, the hardened flags cause relocation errors
       perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
-               -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
+               -e 'ccdlflags' | sed -e 's/-bE:perl.exp//' \
+               -e 's/-specs=[[^ ]*]//g' `
 
       dnl check that compiling a simple program still works with the flags
       dnl added for Perl.
index 828b3c78b657aef79796f14f58b94e2b443391c5..430e79698a237314b4d343cb2b026a89120d8f78 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    408,
 /**/
     407,
 /**/