[packages/binutils] - added libdir patch (suffix-aware bfd-plugins dir; at the cost of relative plugins dir support)
qboosh
qboosh at pld-linux.org
Tue Mar 17 21:26:49 CET 2015
commit f0caedc55d4e238eeb73b99d095c1f7e289f2bf4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Mar 17 21:28:16 2015 +0100
- added libdir patch (suffix-aware bfd-plugins dir; at the cost of relative plugins dir support)
binutils-libdir.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
binutils.spec | 26 +++++++++++++++++++++-----
2 files changed, 66 insertions(+), 5 deletions(-)
---
diff --git a/binutils.spec b/binutils.spec
index 5cb36df..484710a 100644
--- a/binutils.spec
+++ b/binutils.spec
@@ -40,6 +40,7 @@ Patch0: %{name}-gasp.patch
Patch1: %{name}-info.patch
Patch2: %{name}-libtool-relink.patch
Patch3: %{name}-pt_pax_flags.patch
+Patch4: %{name}-libdir.patch
Patch5: %{name}-discarded.patch
Patch6: %{name}-absolute-gnu_debuglink-path.patch
Patch7: %{name}-libtool-m.patch
@@ -169,6 +170,7 @@ niektórych pakietów.
%patch1 -p1
%patch2 -p1
%{?with_pax:%patch3 -p1}
+%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
@@ -253,14 +255,14 @@ sparc32 \
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/bfd-plugins
-install -d $RPM_BUILD_ROOT%{_prefix}/lib/bfd-plugins
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
# remove these man pages unless we cross-build for win*/netware platforms.
# however, this should be done in Makefiles.
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}.1
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windmc,windres}.1
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
@@ -335,13 +337,26 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/size
%attr(755,root,root) %{_bindir}/strings
%attr(755,root,root) %{_bindir}/strip
+%{_prefix}/lib/ldscripts
%{_infodir}/as.info*
%{_infodir}/binutils.info*
%{_infodir}/gprof.info*
%{_infodir}/ld.info*
-%{_prefix}/lib/bfd-plugins
-%{_prefix}/lib/ldscripts
-%{_mandir}/man1/*
+%{_mandir}/man1/addr2line.1*
+%{_mandir}/man1/ar.1*
+%{_mandir}/man1/as.1*
+%{_mandir}/man1/c++filt.1*
+%{_mandir}/man1/elfedit.1*
+%{_mandir}/man1/gprof.1*
+%{_mandir}/man1/ld.1*
+%{_mandir}/man1/nm.1*
+%{_mandir}/man1/objcopy.1*
+%{_mandir}/man1/objdump.1*
+%{_mandir}/man1/ranlib.1*
+%{_mandir}/man1/readelf.1*
+%{_mandir}/man1/size.1*
+%{_mandir}/man1/strings.1*
+%{_mandir}/man1/strip.1*
%lang(cs) %{_mandir}/cs/man1/*
%lang(de) %{_mandir}/de/man1/*
%lang(es) %{_mandir}/es/man1/*
@@ -355,6 +370,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libbfd-*.so
%attr(755,root,root) %{_libdir}/libopcodes-*.so
+%dir %{_libdir}/bfd-plugins
%files devel
%defattr(644,root,root,755)
diff --git a/binutils-libdir.patch b/binutils-libdir.patch
new file mode 100644
index 0000000..b280a40
--- /dev/null
+++ b/binutils-libdir.patch
@@ -0,0 +1,45 @@
+--- binutils-2.25.51.0.1/bfd/Makefile.am.orig 2015-03-15 11:04:52.000000000 +0100
++++ binutils-2.25.51.0.1/bfd/Makefile.am 2015-03-17 20:08:55.482838510 +0100
+@@ -46,7 +46,7 @@
+ WARN_CFLAGS = @WARN_CFLAGS@
+ NO_WERROR = @NO_WERROR@
+ AM_CFLAGS = $(WARN_CFLAGS)
+-AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
++AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"'
+ if PLUGINS
+ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
+ LIBDL = @lt_cv_dlopen_libs@
+--- binutils-2.25.51.0.1/bfd/plugin.c.orig 2015-03-15 11:04:52.000000000 +0100
++++ binutils-2.25.51.0.1/bfd/plugin.c 2015-03-17 21:03:28.116034504 +0100
+@@ -404,8 +404,7 @@
+ static int
+ load_plugin (bfd *abfd)
+ {
+- char *plugin_dir;
+- char *p;
++ const char *p = LIBDIR "/bfd-plugins";
+ DIR *d;
+ struct dirent *ent;
+ int found = 0;
+@@ -416,13 +415,6 @@
+ if (plugin_program_name == NULL)
+ return 0;
+
+- plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL);
+- p = make_relative_prefix (plugin_program_name,
+- BINDIR,
+- plugin_dir);
+- free (plugin_dir);
+- plugin_dir = NULL;
+-
+ d = opendir (p);
+ if (!d)
+ goto out;
+@@ -441,7 +433,6 @@
+ }
+
+ out:
+- free (p);
+ if (d)
+ closedir (d);
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/binutils.git/commitdiff/f0caedc55d4e238eeb73b99d095c1f7e289f2bf4
More information about the pld-cvs-commit
mailing list