]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0104: Linking fails with -lto because of PERL_CFLAGS 14022/head v9.1.0104
authorChristian Brabandt <cb@256bit.org>
Mon, 12 Feb 2024 22:12:26 +0000 (23:12 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 12 Feb 2024 22:14:19 +0000 (23:14 +0100)
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>
src/auto/configure
src/configure.ac
src/version.c

index 70ebb33c4dc1557f904401148a6726ae323cf9e2..5c1464835300eeda7134188f4695dca64a6c8987 100755 (executable)
@@ -6494,10 +6494,11 @@ printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
       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 's/-fdebug-prefix-map[^ ]*//g' \
                -e 's/-pipe //' \
+               -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' | \
@@ -10402,9 +10403,12 @@ system ("touch conf.gtktest");
 tmp_version = g_strdup("$min_gtk_version");
 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    printf("%s, bad version string\n", "$min_gtk_version");
+   g_free(tmp_version);
    exit(1);
  }
 
+g_free(tmp_version);
+
 if ((gtk_major_version > major) ||
     ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
     ((gtk_major_version == major) && (gtk_minor_version == minor) &&
index ebe0d08f6edb8cb39ddd0dc1334768b555419854..664f2194054e07cfd5eb2287838d9af4f04e3695 100644 (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 "-fdebug-prefix-map", it isn't supported by clang.
       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 \
                -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \
                -e 's/-fdebug-prefix-map[[^ ]]*//g' \
                -e 's/-pipe //' \
+               -e 's/-flto\(=auto\)\? //' \
                -e 's/-W[[^ ]]*//g' \
                -e 's/-D_FORTIFY_SOURCE=.//g'`
       dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
index e28a326950ca9b646592fc57d1e8c1d1b555a0d1..17a789948a3c9dace86ade44494cf935395ff9b1 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    104,
 /**/
     103,
 /**/