0
0
mirror of https://github.com/vim/vim.git synced 2025-08-29 20:33:37 -04:00

patch 9.1.0408: configure fails on Fedora when including perl

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>
This commit is contained in:
Christian Brabandt 2024-05-11 20:18:21 +02:00
parent 58448e09be
commit 9c0ff47098
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
3 changed files with 12 additions and 4 deletions

8
src/auto/configure vendored
View File

@ -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; }

View 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.

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
408,
/**/
407,
/**/