[eiciel] Move LDFLAGS before libs and link with --as-needed.

Michael Schwendt mschwendt at fedoraproject.org
Sat Nov 5 23:19:27 UTC 2011


commit eb80ce55e605873fb81fd90bdf0cc5b1278b2412
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Sun Nov 6 00:19:21 2011 +0100

    Move LDFLAGS before libs and link with --as-needed.

 eiciel-0.9.8.1-LDFLAGS.patch |   30 ++++++++++++++++++++++++++++++
 eiciel.spec                  |    8 +++++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/eiciel-0.9.8.1-LDFLAGS.patch b/eiciel-0.9.8.1-LDFLAGS.patch
new file mode 100644
index 0000000..083deec
--- /dev/null
+++ b/eiciel-0.9.8.1-LDFLAGS.patch
@@ -0,0 +1,30 @@
+diff -Nur eiciel-0.9.8.1-orig/src/Makefile.in eiciel-0.9.8.1/src/Makefile.in
+--- eiciel-0.9.8.1-orig/src/Makefile.in	2011-05-14 17:02:10.000000000 +0200
++++ eiciel-0.9.8.1/src/Makefile.in	2011-11-06 00:12:16.740123903 +0100
+@@ -120,7 +120,7 @@
+ libeiciel_nautilus_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ 	$(libeiciel_nautilus_la_CXXFLAGS) $(CXXFLAGS) \
+-	$(libeiciel_nautilus_la_LDFLAGS) $(LDFLAGS) -o $@
++	$(LDFLAGS) $(libeiciel_nautilus_la_LDFLAGS) -o $@
+ PROGRAMS = $(bin_PROGRAMS)
+ am__eiciel_SOURCES_DIST = acl_manager.cpp acl_manager.hpp \
+ 	eiciel_main_controller.cpp eiciel_main_controller.hpp \
+@@ -145,7 +145,7 @@
+ eiciel_LDADD = $(LDADD)
+ eiciel_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXXLD) $(eiciel_CXXFLAGS) $(CXXFLAGS) \
+-	$(eiciel_LDFLAGS) $(LDFLAGS) -o $@
++	$(LDFLAGS) $(eiciel_LDFLAGS) -o $@
+ DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -218,7 +218,7 @@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+ LD = @LD@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -Wl,--as-needed
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+ LIBOBJS = @LIBOBJS@
diff --git a/eiciel.spec b/eiciel.spec
index fbf09cc..e8b1767 100644
--- a/eiciel.spec
+++ b/eiciel.spec
@@ -1,6 +1,6 @@
 Name:           eiciel
 Version:        0.9.8.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Graphical access control list (ACL) editor
 Group:          Applications/System
 License:        GPLv2+
@@ -12,6 +12,8 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # anyone wishing to submit a "real" patch that involves querying libuser
 # directly is MORE than welcome to do so :)
 Patch0:		fedora_sys_usergroups.patch
+# move LDFLAGS before libs, add -Wl,--as-needed
+Patch1: eiciel-0.9.8.1-LDFLAGS.patch
 
 BuildRequires:  libgnomeui-devel libacl-devel nautilus-devel
 BuildRequires:  gtkmm30-devel
@@ -36,6 +38,7 @@ extension within Nautilus, or as a standalone utility.
 %if 0%{?fedora} < 16
 %patch0 -b .uid_gid_range
 %endif
+%patch1 -p1 -b .LDFLAGS
 
 iconv -f ISO-8859-1 -t UTF-8 AUTHORS > foo
 mv foo AUTHORS
@@ -89,6 +92,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Sat Nov  5 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.9.8.1-2
+- Move LDFLAGS before libs and link with --as-needed.
+
 * Sun Jul 31 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.9.8.1-1
 - Update to 0.9.8.1 to fix GTK2 vs. GTK3 crash (#726950)
   and Nautilus freeze (#703924).


More information about the scm-commits mailing list