[packages/crossmingw64-binutils] - up to 2.26, target changed to x86_64-w64-mingw64

qboosh qboosh at pld-linux.org
Tue Feb 2 21:59:46 CET 2016


commit a5f47242bccd86395683c65c842334fdbd59672d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 2 22:02:13 2016 +0100

    - up to 2.26, target changed to x86_64-w64-mingw64

 binutils-am.patch          |  22 ++++++++
 binutils-libdir.patch      |  45 +++++++++++++++
 crossmingw64-binutils.spec | 137 ++++++++++++++++++++++++++++++++++++---------
 3 files changed, 177 insertions(+), 27 deletions(-)
---
diff --git a/crossmingw64-binutils.spec b/crossmingw64-binutils.spec
index c6f3a65..f027ce7 100644
--- a/crossmingw64-binutils.spec
+++ b/crossmingw64-binutils.spec
@@ -1,36 +1,40 @@
-Summary:	Cross Mingw64 GNU binary utility development utilities - binutils
-Summary(es.UTF-8):	Utilitarios para desarrollo de binarios de la GNU - Mingw64 binutils
-Summary(fr.UTF-8):	Utilitaires de développement binaire de GNU - Mingw64 binutils
-Summary(pl.UTF-8):	Skrośne narzędzia programistyczne GNU dla Mingw64 - binutils
-Summary(pt_BR.UTF-8):	Utilitários para desenvolvimento de binários da GNU - Mingw64 binutils
+Summary:	Cross MinGW64 GNU binary utility development utilities - binutils
+Summary(es.UTF-8):	Utilitarios para desarrollo de binarios de la GNU - MinGW64 binutils
+Summary(fr.UTF-8):	Utilitaires de développement binaire de GNU - MinGW64 binutils
+Summary(pl.UTF-8):	Skrośne narzędzia programistyczne GNU dla MinGW64 - binutils
+Summary(pt_BR.UTF-8):	Utilitários para desenvolvimento de binários da GNU - MinGW64 binutils
 Summary(tr.UTF-8):	GNU geliştirme araçları - Mingw64 binutils
 Name:		crossmingw64-binutils
-Version:	2.23.51.0.8
+Version:	2.26
 Release:	1
 License:	GPL v3+
 Group:		Development/Tools
-Source0:	http://www.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
-# Source0-md5:	52db235c4e05928827a37ae1e8213bc7
+Source0:	http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
+# Source0-md5:	64146a0faa3b411ba774f47d41de239f
+Patch0:		binutils-libdir.patch
+Patch1:		binutils-am.patch
 URL:		http://sources.redhat.com/binutils/
-BuildRequires:	automake
+BuildRequires:	autoconf >= 2.64
+BuildRequires:	automake >= 1:1.11
 BuildRequires:	bash
 BuildRequires:	bison
 BuildRequires:	flex
 BuildRequires:	gettext-tools
-BuildRequires:	zlib-devel
+BuildRequires:	perl-tools-pod
 # not necessary unless we patch .texi docs; but they are not packaged here anyway
 #BuildRequires:	texinfo >= 4.2
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		target		x86_64-w64-mingw32
+%define		target		x86_64-w64-mingw64
 %define		arch		%{_prefix}/%{target}
 
 %description
 crossmingw64 is a complete cross-compiling development system for
 building stand-alone Microsoft Windows applications under Linux using
-the Mingw64 build libraries. This includes a binutils, gcc with g++
-and objc, and libstdc++, all cross targeted to x86_64-mingw32, along
-with supporting Win64 libraries in 'coff' format from free sources.
+the MinGW64 build libraries. This includes a binutils, gcc with g++
+and objc, and libstdc++, all cross targeted to x86_64-w64-mingw32,
+along with supporting Win64 libraries in 'coff' format from free
+sources.
 
 This package contains cross targeted binutils.
 
@@ -38,46 +42,76 @@ This package contains cross targeted binutils.
 crossmingw64 jest kompletnym systemem do kroskompilacji, pozwalającym
 budować aplikacje MS Windows pod Linuksem używając bibliotek mingw64.
 System składa się z binutils, gcc z g++ i objc, libstdc++ - wszystkie
-generujące kod dla platformy x86_64-mingw32, oraz z bibliotek w formacie
-COFF.
+generujące kod dla platformy x86_64-w64-mingw32, oraz z bibliotek w
+formacie COFF.
 
 Ten pakiet zawiera binutils generujące skrośnie binaria dla Win64.
 
 %prep
 %setup -q -n binutils-%{version}
+%patch0 -p1
+%patch1 -p1
+
+# file contains hacks for ac 2.64 only
+%{__rm} config/override.m4
+%{__sed} -i '/^m4_include(config\/override\.m4/d' configure.ac
 
 %build
+cp -f /usr/share/automake/config.* .
+%{__aclocal}
+%{__autoconf}
+
+# non-standard regeneration (needed because of libdir patch)
+# AM_BINUTILS_WARNINGS in bfd/warning.m4, ZW_GNU_GETTEXT_SISTER_DIR in config/gettext-sister.m4
+for dir in gas bfd; do
+	cd $dir || exit 1
+	%{__aclocal} -I .. -I ../config -I ../bfd
+	%{__automake} Makefile
+	%{__automake} doc/Makefile
+	%{__autoconf}
+	cd ..
+done
+
+# We don't install libbfd (nor use shared binutils libraries) to avoid
+# conflict with native binutils.
+
 # ldscripts won't be generated properly if SHELL is not bash...
 CFLAGS="%{rpmcflags}" \
 LDFLAGS="%{rpmldflags}" \
 CONFIG_SHELL="/bin/bash" \
 ./configure \
-	--disable-shared \
 	--disable-nls \
+	--disable-shared \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
-	--libexecdir=%{_libdir} \
 	--mandir=%{_mandir} \
 	--infodir=%{_infodir} \
-	--with-sysroot=%{arch} \
 	--host=%{_target_platform} \
 	--build=%{_target_platform} \
 	--target=%{target}
 
-%{__make} all
+%{__make} all \
+	tooldir=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	INSTALL='$$s/install-sh -c' \
+	prefix=$RPM_BUILD_ROOT%{_prefix} \
+	mandir=$RPM_BUILD_ROOT%{_mandir} \
+	infodir=$RPM_BUILD_ROOT%{_infodir} \
+	libdir=$RPM_BUILD_ROOT%{_libdir}
 
 # remove this man page unless we cross-build for netware platform.
 # however, this should be done in Makefiles.
-rm $RPM_BUILD_ROOT%{_mandir}/man1/*nlmconv.1
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/*nlmconv.1
+
+# not prefixed, keep infos only from native packages
+%{__rm} -r $RPM_BUILD_ROOT%{_infodir}
 
-# libiberty.a is ELF not PE
-rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# "filesystem" for crossmingw32-* packages (move to crossmingw32-dirs?)
+install -d $RPM_BUILD_ROOT%{arch}/lib/pkgconfig
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -85,10 +119,59 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc README
+# mingw64 directory tree
 %dir %{arch}
 %dir %{arch}/lib
+%dir %{arch}/lib/pkgconfig
 %dir %{arch}/bin
-%attr(755,root,root) %{arch}/bin/*
+# binutils files
+%attr(755,root,root) %{arch}/bin/ar
+%attr(755,root,root) %{arch}/bin/as
+%attr(755,root,root) %{arch}/bin/dlltool
+%attr(755,root,root) %{arch}/bin/ld
+%attr(755,root,root) %{arch}/bin/ld.bfd
+%attr(755,root,root) %{arch}/bin/nm
+%attr(755,root,root) %{arch}/bin/objcopy
+%attr(755,root,root) %{arch}/bin/objdump
+%attr(755,root,root) %{arch}/bin/ranlib
+%attr(755,root,root) %{arch}/bin/readelf
+%attr(755,root,root) %{arch}/bin/strip
 %{arch}/lib/ldscripts
-%attr(755,root,root) %{_bindir}/%{target}-*
-%{_mandir}/man1/%{target}-*
+%attr(755,root,root) %{_bindir}/%{target}-addr2line
+%attr(755,root,root) %{_bindir}/%{target}-ar
+%attr(755,root,root) %{_bindir}/%{target}-as
+%attr(755,root,root) %{_bindir}/%{target}-c++filt
+%attr(755,root,root) %{_bindir}/%{target}-dlltool
+%attr(755,root,root) %{_bindir}/%{target}-dllwrap
+%attr(755,root,root) %{_bindir}/%{target}-elfedit
+%attr(755,root,root) %{_bindir}/%{target}-gprof
+%attr(755,root,root) %{_bindir}/%{target}-ld
+%attr(755,root,root) %{_bindir}/%{target}-ld.bfd
+%attr(755,root,root) %{_bindir}/%{target}-nm
+%attr(755,root,root) %{_bindir}/%{target}-objcopy
+%attr(755,root,root) %{_bindir}/%{target}-objdump
+%attr(755,root,root) %{_bindir}/%{target}-ranlib
+%attr(755,root,root) %{_bindir}/%{target}-readelf
+%attr(755,root,root) %{_bindir}/%{target}-size
+%attr(755,root,root) %{_bindir}/%{target}-strings
+%attr(755,root,root) %{_bindir}/%{target}-strip
+%attr(755,root,root) %{_bindir}/%{target}-windmc
+%attr(755,root,root) %{_bindir}/%{target}-windres
+%{_mandir}/man1/%{target}-addr2line.1*
+%{_mandir}/man1/%{target}-ar.1*
+%{_mandir}/man1/%{target}-as.1*
+%{_mandir}/man1/%{target}-c++filt.1*
+%{_mandir}/man1/%{target}-dlltool.1*
+%{_mandir}/man1/%{target}-elfedit.1*
+%{_mandir}/man1/%{target}-gprof.1*
+%{_mandir}/man1/%{target}-ld.1*
+%{_mandir}/man1/%{target}-nm.1*
+%{_mandir}/man1/%{target}-objcopy.1*
+%{_mandir}/man1/%{target}-objdump.1*
+%{_mandir}/man1/%{target}-ranlib.1*
+%{_mandir}/man1/%{target}-readelf.1*
+%{_mandir}/man1/%{target}-size.1*
+%{_mandir}/man1/%{target}-strings.1*
+%{_mandir}/man1/%{target}-strip.1*
+%{_mandir}/man1/%{target}-windmc.1*
+%{_mandir}/man1/%{target}-windres.1*
diff --git a/binutils-am.patch b/binutils-am.patch
new file mode 100644
index 0000000..f1d1945
--- /dev/null
+++ b/binutils-am.patch
@@ -0,0 +1,22 @@
+--- binutils-2.23.51.0.9/gas/doc/Makefile.am.orig	2013-02-04 21:04:42.928606932 +0100
++++ binutils-2.23.51.0.9/gas/doc/Makefile.am	2013-02-04 21:31:30.648573422 +0100
+@@ -17,7 +17,7 @@
+ # <http://www.gnu.org/licenses/>.
+ #
+ 
+-AUTOMAKE_OPTIONS = 1.8 cygnus
++AUTOMAKE_OPTIONS = 1.8
+ 
+ # What version of the manual you want; "all" includes everything
+ CONFIG=all
+--- binutils-2.23.51.0.9/bfd/doc/Makefile.am.orig	2013-02-02 00:24:54.000000000 +0100
++++ binutils-2.23.51.0.9/bfd/doc/Makefile.am	2013-02-05 19:33:46.556919813 +0100
+@@ -17,7 +17,7 @@
+ # <http://www.gnu.org/licenses/>.
+ #
+ 
+-AUTOMAKE_OPTIONS = 1.9 cygnus
++AUTOMAKE_OPTIONS = 1.9
+ 
+ DOCFILES = aoutx.texi  archive.texi archures.texi \
+ 	bfdt.texi  cache.texi coffcode.texi \
diff --git a/binutils-libdir.patch b/binutils-libdir.patch
new file mode 100644
index 0000000..d8ec2c0
--- /dev/null
+++ b/binutils-libdir.patch
@@ -0,0 +1,45 @@
+--- binutils-2.26/bfd/Makefile.am.orig	2016-01-26 21:10:01.893801762 +0100
++++ binutils-2.26/bfd/Makefile.am	2016-01-26 21:10:42.507133384 +0100
+@@ -52,7 +52,7 @@
+ WARN_CFLAGS = @WARN_CFLAGS@
+ NO_WERROR = @NO_WERROR@
+ AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+-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/crossmingw64-binutils.git/commitdiff/a5f47242bccd86395683c65c842334fdbd59672d



More information about the pld-cvs-commit mailing list