pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gimp gimp: work around problems with cc -v + ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8ba93f9523f
branches:  trunk
changeset: 769524:d8ba93f9523f
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Nov 15 22:13:56 2021 +0000

description:
gimp: work around problems with cc -v + cwrappers appending link flags

As ryoon@ reported to me after I committed a bit more MKRELRO churn,
ensuring RELRO is always applied through the compiler wrappers causes
a build failure.

This is because GIMP is attempting to parse the output of gcc --version,
which returns an error message (indicating a link failure of a nonexistent
program) alongside the version information when -Wl,-zrelro is appended
or prepended through cwrappers.

So, we use -c to avoid linking the nonexisting program we are "compiling".

diffstat:

 graphics/gimp/distinfo                   |   5 +++--
 graphics/gimp/patches/patch-ab           |  25 ++++++++++++++++++++++---
 graphics/gimp/patches/patch-configure.ac |  23 +++++++++++++++++++++++
 3 files changed, 48 insertions(+), 5 deletions(-)

diffs (79 lines):

diff -r 7fdfa874b0f6 -r d8ba93f9523f graphics/gimp/distinfo
--- a/graphics/gimp/distinfo    Mon Nov 15 22:13:53 2021 +0000
+++ b/graphics/gimp/distinfo    Mon Nov 15 22:13:56 2021 +0000
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.107 2021/10/26 10:46:10 nia Exp $
+$NetBSD: distinfo,v 1.108 2021/11/15 22:13:56 nia Exp $
 
 BLAKE2s (gimp-2.10.28.tar.bz2) = 2577465b816e214b9423d9c06e84f0fbbbd6aed1a6b91d4855fb3beb2fe754d4
 SHA512 (gimp-2.10.28.tar.bz2) = 587f6f46741672f0700fd642a5b779694d2d8bc8ad70e7677ccdbfc2266dc62203ed347d6aaffaa4b8e7d84a84a25f7d5a51507dfd64b21b4c05970856d3ab94
 Size (gimp-2.10.28.tar.bz2) = 31675862 bytes
 SHA1 (patch-aa) = 403c46d7070de208769e99e512922ba3a5b7129b
-SHA1 (patch-ab) = ee2fef07a87c407ff016d13aa93c51678d6dfa70
+SHA1 (patch-ab) = 44d37daf37ec604f97bb5b3edf0908ada56ed6d6
 SHA1 (patch-app_core_gimpbrush-transform.cc) = 3bd3f69401ee7dabb53f7ebf533870ee9add856c
+SHA1 (patch-configure.ac) = c7e89bc9fd576eb95a9288eccea8959cbe1ee6de
 SHA1 (patch-plug-ins_common_file-mng.c) = 8ed244997cdef7125e1aa5da4d0fac5068ad5159
 SHA1 (patch-plug-ins_pygimp_py-compile) = 59dcdd00073b737f8f52e6a56832722033ee5703
 SHA1 (patch-plug-ins_script-fu_script-fu-server.c) = c424b1a8e345ec3d0763ac2cf1f8535da9e10797
diff -r 7fdfa874b0f6 -r d8ba93f9523f graphics/gimp/patches/patch-ab
--- a/graphics/gimp/patches/patch-ab    Mon Nov 15 22:13:53 2021 +0000
+++ b/graphics/gimp/patches/patch-ab    Mon Nov 15 22:13:56 2021 +0000
@@ -1,8 +1,27 @@
-$NetBSD: patch-ab,v 1.40 2021/10/01 14:29:05 ryoon Exp $
+$NetBSD: patch-ab,v 1.41 2021/11/15 22:13:56 nia Exp $
+
+CC_VERSION_OPTS for gcc is modified to avoid going through the link
+stage. If pkgsrc appends or prepends any linker flags through
+CWRAPPERS (e.g. for MKRELRO), getting the version of the compiler may
+fail because GCC will try to link the nonexistent program.
 
---- configure.orig     2013-11-03 17:00:19.000000000 +0000
+--- configure.orig     2021-09-14 15:56:15.000000000 +0000
 +++ configure
-@@ -23499,7 +23503,7 @@ fi
+@@ -22344,11 +22344,11 @@ WARNING: GCC 7.2.0 has a serious bug aff
+          See https://bugzilla.gnome.org/show_bug.cgi?id=787222";
+   fi
+   # For GCC, use -v which has more information than --version.
+-  CC_VERSION_OPTS="-v"
++  CC_VERSION_OPTS="-c -v"
+ else
+   # This is the list of common options used by autotools to check
+   # versions for various compilers.
+-  CC_VERSION_OPTS="--version -v -V -qversion"
++  CC_VERSION_OPTS="-c --version -v -V -qversion"
+ fi
+ 
+ for CC_VERSION_OPT in $CC_VERSION_OPTS; do
+@@ -36084,7 +36084,7 @@ esac
  
  gimpdatadir="$datadir/$PACKAGE/2.0"
  gimpplugindir="$libdir/$PACKAGE/2.0"
diff -r 7fdfa874b0f6 -r d8ba93f9523f graphics/gimp/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gimp/patches/patch-configure.ac  Mon Nov 15 22:13:56 2021 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-configure.ac,v 1.1 2021/11/15 22:13:56 nia Exp $
+
+CC_VERSION_OPTS for gcc is modified to avoid going through the link
+stage. If pkgsrc appends or prepends any linker flags through
+CWRAPPERS (e.g. for MKRELRO), getting the version of the compiler may
+fail because GCC will try to link the nonexistent program.
+
+--- configure.ac.orig  2021-09-14 15:53:08.000000000 +0000
++++ configure.ac
+@@ -576,11 +576,11 @@ WARNING: GCC 7.2.0 has a serious bug aff
+          See https://bugzilla.gnome.org/show_bug.cgi?id=787222";
+   fi
+   # For GCC, use -v which has more information than --version.
+-  CC_VERSION_OPTS="-v"
++  CC_VERSION_OPTS="-c -v"
+ else
+   # This is the list of common options used by autotools to check
+   # versions for various compilers.
+-  CC_VERSION_OPTS="--version -v -V -qversion"
++  CC_VERSION_OPTS="-c --version -v -V -qversion"
+ fi
+ 
+ for CC_VERSION_OPT in $CC_VERSION_OPTS; do



Home | Main Index | Thread Index | Old Index