]> git.pld-linux.org Git - packages/binutils.git/commitdiff
- added libdir patch (suffix-aware bfd-plugins dir; at the cost of relative plugins... auto/th/binutils-2.25.51.0.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 17 Mar 2015 20:28:16 +0000 (21:28 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 17 Mar 2015 20:28:16 +0000 (21:28 +0100)
binutils-libdir.patch [new file with mode: 0644]
binutils.spec

diff --git a/binutils-libdir.patch b/binutils-libdir.patch
new file mode 100644 (file)
index 0000000..b280a40
--- /dev/null
@@ -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);
index 5cb36dfdb1c74790b99d7474cb297bd68b283a84..484710ae8d2a996a25ef4022874d511a42392e08 100644 (file)
@@ -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)
This page took 0.207178 seconds and 4 git commands to generate.