[geeqie] Link with --as-needed.

Michael Schwendt mschwendt at fedoraproject.org
Sun Nov 6 00:08:07 UTC 2011


commit ef6284908d12b1c705841ea4b83f950ff455ae43
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Sun Nov 6 01:07:59 2011 +0100

    Link with --as-needed.

 geeqie-1.0-LDFLAGS.patch |   24 ++++++++++++++++++++++++
 geeqie.spec              |    9 ++++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/geeqie-1.0-LDFLAGS.patch b/geeqie-1.0-LDFLAGS.patch
new file mode 100644
index 0000000..8a14e43
--- /dev/null
+++ b/geeqie-1.0-LDFLAGS.patch
@@ -0,0 +1,24 @@
+diff -Nur geeqie-1.0-orig/src/Makefile.am geeqie-1.0/src/Makefile.am
+--- geeqie-1.0-orig/src/Makefile.am	2010-02-17 22:21:19.000000000 +0100
++++ geeqie-1.0/src/Makefile.am	2011-11-06 00:56:32.090574656 +0100
+@@ -1,6 +1,8 @@
+ SUBDIRS = icons
+ DIST_SUBDIRS = icons
+ 
++AM_LDFLAGS = -Wl,--as-needed
++
+ AM_CFLAGS =				\
+ 	$(GLIB_CFLAGS) $(GTK_CFLAGS)	\
+ 	$(LCMS_CFLAGS)			\
+diff -Nur geeqie-1.0-orig/src/Makefile.in geeqie-1.0/src/Makefile.in
+--- geeqie-1.0-orig/src/Makefile.in	2010-02-17 22:21:45.000000000 +0100
++++ geeqie-1.0/src/Makefile.in	2011-11-06 00:56:33.147517364 +0100
+@@ -196,7 +196,7 @@
+ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+ LCMS_CFLAGS = @LCMS_CFLAGS@
+ LCMS_LIBS = @LCMS_LIBS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -Wl,--as-needed
+ LIBCHAMPLAIN_CFLAGS = @LIBCHAMPLAIN_CFLAGS@
+ LIBCHAMPLAIN_GTK_CFLAGS = @LIBCHAMPLAIN_GTK_CFLAGS@
+ LIBCHAMPLAIN_GTK_LIBS = @LIBCHAMPLAIN_GTK_LIBS@
diff --git a/geeqie.spec b/geeqie.spec
index 537e294..37606ad 100644
--- a/geeqie.spec
+++ b/geeqie.spec
@@ -3,7 +3,7 @@
 Summary: Image browser and viewer
 Name: geeqie
 Version: 1.0
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv3
 Group: User Interface/X
 # svn + autogen
@@ -27,6 +27,9 @@ Patch5: geeqie-1.0-filedata-compare.patch
 # upstream stable tree
 Patch6: geeqie-1.0-copy-chown.patch
 Patch7: geeqie-1.0-ui_pathsel.patch
+# add -Wl,--as-needed without disturbing %%configure macro
+# this touches both Makefile.in and Makefile.am as autoreconf is used
+Patch8: geeqie-1.0-LDFLAGS.patch
 
 BuildRequires: gtk2-devel
 BuildRequires: lcms-devel
@@ -72,6 +75,7 @@ done
 %patch5 -p1 -b .filedata-compare
 %patch6 -p1 -b .copy-chown
 %patch7 -p1 -b .ui_pathsel
+%patch8 -p1 -b .LDFLAGS
 
 
 %build
@@ -120,6 +124,9 @@ update-desktop-database &> /dev/null || :
 
 
 %changelog
+* Sat Nov  5 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.0-14
+- Link with --as-needed.
+
 * Sun Oct 16 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.0-13
 - Cherry-pick a few commits (from Vladimir Nadvornik, Klaus Ethgen
   and Vladislav Naumov). With the modified filelist_sort_compare_filedata


More information about the scm-commits mailing list