0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.1.0104: Linking fails with -lto because of PERL_CFLAGS

Problem:  Linking fails with -lto because of PERL_CFLAGS
          (Zoltan Toth)
Solution: Filter out -flto argument from Perl CFLAGS.

fixes: #14012

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-02-12 23:12:26 +01:00
parent f0a9d65e0a
commit 2f9aef42af
3 changed files with 10 additions and 2 deletions

6
src/auto/configure vendored
View File

@@ -6494,10 +6494,11 @@ printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
fi fi
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \ -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
-e 's/-fdebug-prefix-map[^ ]*//g' \ -e 's/-fdebug-prefix-map[^ ]*//g' \
-e 's/-pipe //' \ -e 's/-pipe //' \
-e 's/-flto\(=auto\)\? //' \
-e 's/-W[^ ]*//g' \ -e 's/-W[^ ]*//g' \
-e 's/-D_FORTIFY_SOURCE=.//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' | \
@@ -10402,9 +10403,12 @@ system ("touch conf.gtktest");
tmp_version = g_strdup("$min_gtk_version"); tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) { if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version"); printf("%s, bad version string\n", "$min_gtk_version");
g_free(tmp_version);
exit(1); exit(1);
} }
g_free(tmp_version);
if ((gtk_major_version > major) || if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && ((gtk_major_version == major) && (gtk_minor_version == minor) &&

View File

@@ -1163,11 +1163,13 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
dnl Remove "-fno-something", it breaks using cproto. dnl Remove "-fno-something", it breaks using cproto.
dnl Remove "-fdebug-prefix-map", it isn't supported by clang. dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
dnl Remove "FORTIFY_SOURCE", it will be defined twice. dnl Remove "FORTIFY_SOURCE", it will be defined twice.
dnl remove -pipe and -Wxxx, it confuses cproto dnl Remove -pipe and -Wxxx, it confuses cproto
dnl Remove -flto[=auto], it causes link failures for clang
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \ -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \
-e 's/-fdebug-prefix-map[[^ ]]*//g' \ -e 's/-fdebug-prefix-map[[^ ]]*//g' \
-e 's/-pipe //' \ -e 's/-pipe //' \
-e 's/-flto\(=auto\)\? //' \
-e 's/-W[[^ ]]*//g' \ -e 's/-W[[^ ]]*//g' \
-e 's/-D_FORTIFY_SOURCE=.//g'` -e 's/-D_FORTIFY_SOURCE=.//g'`
dnl Remove "-lc", it breaks on FreeBSD when using "-pthread". dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".

View File

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