From 1ec8aa42e0892f04400039ea1e5ede51ffc4d35e Mon Sep 17 00:00:00 2001 From: Alexpux Date: Tue, 23 Dec 2014 20:52:14 +0300 Subject: [PATCH] binutils: Update to 2.25 --- binutils/01-w32api-sysroot.patch | 20 ---------- binutils/02-x86-64-pc32-relocs.patch | 51 ------------------------ binutils/2.23.52-install-libiberty.patch | 20 ---------- binutils/2.24.51-ld-__dso_handle.patch | 30 -------------- binutils/PKGBUILD | 32 ++++----------- binutils/binutils-trunk-msys2.patch | 44 ++++++++++++++------ 6 files changed, 40 insertions(+), 157 deletions(-) delete mode 100644 binutils/01-w32api-sysroot.patch delete mode 100644 binutils/02-x86-64-pc32-relocs.patch delete mode 100644 binutils/2.23.52-install-libiberty.patch delete mode 100644 binutils/2.24.51-ld-__dso_handle.patch diff --git a/binutils/01-w32api-sysroot.patch b/binutils/01-w32api-sysroot.patch deleted file mode 100644 index 7e4f52be..00000000 --- a/binutils/01-w32api-sysroot.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- origsrc/binutils-/ld/configure.tgt 2013-02-16 20:25:21.327704300 -0600 -+++ src/binutils-/ld/configure.tgt 2013-02-16 20:52:53.128181900 -0600 -@@ -310,7 +310,7 @@ i[3-7]86-*-pe) targ_emul=i386pe ; - targ_extra_ofiles="deffilep.o pe-dll.o" ;; - i[3-7]86-*-cygwin*) targ_emul=i386pe ; - targ_extra_ofiles="deffilep.o pe-dll.o" -- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;; -+ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api' ;; - i[3-7]86-*-mingw32*) targ_emul=i386pe ; - targ_extra_ofiles="deffilep.o pe-dll.o" ;; - x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ; -@@ -319,7 +319,7 @@ x86_64-*-pe | x86_64-*-pep) targ_emul=i3 - x86_64-*-cygwin) targ_emul=i386pep ; - targ_extra_emuls=i386pe - targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" -- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;; -+ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api' ;; - x86_64-*-mingw*) targ_emul=i386pep ; - targ_extra_emuls=i386pe - targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;; diff --git a/binutils/02-x86-64-pc32-relocs.patch b/binutils/02-x86-64-pc32-relocs.patch deleted file mode 100644 index 53da6aa7..00000000 --- a/binutils/02-x86-64-pc32-relocs.patch +++ /dev/null @@ -1,51 +0,0 @@ -Index: bfd/cofflink.c -=================================================================== -RCS file: /cvs/src/src/bfd/cofflink.c,v -retrieving revision 1.84 -diff -c -p -r1.84 cofflink.c -*** bfd/cofflink.c 10 Jan 2013 20:03:52 -0000 1.84 ---- bfd/cofflink.c 4 Jun 2013 12:03:23 -0000 -*************** _bfd_coff_generic_relocate_section (bfd -*** 3060,3065 **** ---- 3060,3070 ---- - else - { - sec = sections[symndx]; -+ -+ /* If the output section has been discarded then ignore this reloc. */ -+ if (sec->output_section->vma == 0) -+ continue; -+ - val = (sec->output_section->vma - + sec->output_offset - + sym->n_value); -*************** _bfd_coff_generic_relocate_section (bfd -*** 3080,3086 **** - + sec->output_section->vma - + sec->output_offset); - } -- - else if (h->root.type == bfd_link_hash_undefweak) - { - if (h->symbol_class == C_NT_WEAK && h->numaux == 1) ---- 3085,3090 ---- -*************** _bfd_coff_generic_relocate_section (bfd -*** 3116,3122 **** - /* This is a GNU extension. */ - val = 0; - } -- - else if (! info->relocatable) - { - if (! ((*info->callbacks->undefined_symbol) ---- 3120,3125 ---- -*************** _bfd_coff_generic_relocate_section (bfd -*** 3183,3189 **** - if (name == NULL) - return FALSE; - } -- - if (! ((*info->callbacks->reloc_overflow) - (info, (h ? &h->root : NULL), name, howto->name, - (bfd_vma) 0, input_bfd, input_section, ---- 3186,3191 ---- diff --git a/binutils/2.23.52-install-libiberty.patch b/binutils/2.23.52-install-libiberty.patch deleted file mode 100644 index 89c071db..00000000 --- a/binutils/2.23.52-install-libiberty.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- origsrc/binutils-2.23.52/libiberty/configure 2013-05-31 20:01:43.000000000 -0500 -+++ src/binutils-2.23.52/libiberty/configure 2013-06-04 15:04:57.162176000 -0500 -@@ -5507,7 +5507,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS ---- origsrc/binutils-2.23.52/libiberty/configure.ac 2013-05-31 20:01:44.000000000 -0500 -+++ src/binutils-2.23.52/libiberty/configure.ac 2013-06-04 15:04:48.269667400 -0500 -@@ -405,7 +405,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS diff --git a/binutils/2.24.51-ld-__dso_handle.patch b/binutils/2.24.51-ld-__dso_handle.patch deleted file mode 100644 index 4febf835..00000000 --- a/binutils/2.24.51-ld-__dso_handle.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9f16f44e8731c667841b401c9626a48ed55d03d0 Mon Sep 17 00:00:00 2001 -From: Yaakov Selkowitz -Date: Mon, 11 Aug 2014 11:48:57 -0500 -Subject: [PATCH] ld: do not export __dso_handle for PE - - * pe-dll.c (autofilter_symbollist_i386): Add __dso_handle. ---- -This is necessary for adding __cxa_atexit support for Cygwin in GCC -without exporting __dso_handle from every DLL. (On ELF platforms, -__dso_handle is marked hidden visibility, but we don't have support -for that yet on PE platforms.) - - ld/pe-dll.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ld/pe-dll.c b/ld/pe-dll.c -index d38f30d..61d8fa5 100644 ---- a/ld/pe-dll.c -+++ b/ld/pe-dll.c -@@ -235,6 +235,7 @@ static const autofilter_entry_type autofilter_symbollist_i386[] = - { STRING_COMMA_LEN ("_impure_ptr") }, - { STRING_COMMA_LEN ("_fmode") }, - { STRING_COMMA_LEN ("environ") }, -+ { STRING_COMMA_LEN ("__dso_handle") }, - { NULL, 0 } - }; - --- -1.8.5.5 - diff --git a/binutils/PKGBUILD b/binutils/PKGBUILD index 26408e92..6f36d8a2 100644 --- a/binutils/PKGBUILD +++ b/binutils/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov pkgname=binutils -_basever=2.24.51 -pkgver=${_basever}.20140703 +_basever=2.25 +pkgver=${_basever} #pkgver=2.24.51 -pkgrel=5 +pkgrel=1 pkgdesc="A set of programs to assemble and manipulate binary and object files" arch=('i686' 'x86_64') url="http://www.gnu.org/software/binutils/" @@ -15,34 +15,18 @@ checkdepends=('dejagnu' 'bc') makedepends=('libiconv-devel' 'gettext-devel' 'zlib-devel') options=('staticlibs' '!distcc' '!ccache') install=binutils.install -source=(http://sourceware.mirrors.tds.net/pub/sourceware.org/binutils/snapshots/binutils-${_basever}.tar.bz2 - #ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig} +source=(#http://sourceware.mirrors.tds.net/pub/sourceware.org/binutils/snapshots/binutils-${_basever}.tar.bz2 + ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig} #http://cygwin.parentingamerica.com/x86_64/release/binutils/binutils-2.24.51-5-src.tar.xz - 02-x86-64-pc32-relocs.patch - 2.23.52-install-libiberty.patch - 2.24.51-ld-__dso_handle.patch binutils-trunk-msys2.patch) -md5sums=('f5e3cc4f3ae0c3146cff5d629fe1dd5e' - 'e7e91814b32f4c4c63d4c777f5eabf7f' - 'bbedd06f1acf9cab0a8dda20380cf26b' - 'eaf22828908732c45b56aafeba43d7be' - 'ab551f5a85a3275eaf8a08c73d6e19ca') +md5sums=('d9f3303f802a5b6b0bb73a335ab89d66' + 'SKIP' + '81d65b787c8979e7a94d232222bb9bc1') prepare() { cd ${srcdir}/binutils-$_basever - #if [ "${CARCH}" = "x86_64" ]; then - # msg "Applying reloc patch" - # patch -p0 -i $srcdir/02-x86-64-pc32-relocs.patch - #fi - - #patch -p2 -i $srcdir/2.23.52-install-libiberty.patch - patch -p1 -i $srcdir/2.24.51-ld-__dso_handle.patch patch -p1 -i $srcdir/binutils-trunk-msys2.patch - #rm -rf gdb - - #autoreconf -fi - # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure diff --git a/binutils/binutils-trunk-msys2.patch b/binutils/binutils-trunk-msys2.patch index 6d6e91d3..894718b6 100644 --- a/binutils/binutils-trunk-msys2.patch +++ b/binutils/binutils-trunk-msys2.patch @@ -128,7 +128,7 @@ diff -Naur binutils-2.24.51/bfd/configure binutils-2.24.51-msys2/bfd/configure sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; + -+ msys*) ++ msys*) + # Msys DLLs use 'msys-' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + @@ -178,9 +178,9 @@ diff -Naur binutils-2.24.51/bfd/configure binutils-2.24.51-msys2/bfd/configure if test -n "$SHARED_LIBADD"; then if test -n "$LIBM"; then if test x"$bfd_cv_ld_as_needed" = xyes; then -diff -Naur binutils-2.24.51/bfd/configure.in binutils-2.24.51-msys2/bfd/configure.in ---- binutils-2.24.51/bfd/configure.in 2013-10-03 18:46:06.000000000 +0400 -+++ binutils-2.24.51-msys2/bfd/configure.in 2013-10-24 16:05:08.356000000 +0400 +diff -Naur binutils-2.24.51/bfd/configure.ac binutils-2.24.51-msys2/bfd/configure.ac +--- binutils-2.24.51/bfd/configure.ac 2013-10-03 18:46:06.000000000 +0400 ++++ binutils-2.24.51-msys2/bfd/configure.ac 2013-10-24 16:05:08.356000000 +0400 @@ -577,8 +577,12 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" @@ -385,9 +385,9 @@ diff -Naur binutils-2.24.51/binutils/configure binutils-2.24.51-msys2/binutils/c BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' if test -z "$DLLTOOL_DEFAULT"; then DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" -diff -Naur binutils-2.24.51/binutils/configure.in binutils-2.24.51-msys2/binutils/configure.in ---- binutils-2.24.51/binutils/configure.in 2013-04-05 08:13:41.000000000 +0400 -+++ binutils-2.24.51-msys2/binutils/configure.in 2013-10-24 16:05:08.387200000 +0400 +diff -Naur binutils-2.24.51/binutils/configure.ac binutils-2.24.51-msys2/binutils/configure.ac +--- binutils-2.24.51/binutils/configure.ac 2013-04-05 08:13:41.000000000 +0400 ++++ binutils-2.24.51-msys2/binutils/configure.ac 2013-10-24 16:05:08.387200000 +0400 @@ -302,7 +302,7 @@ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' @@ -492,6 +492,26 @@ diff -Naur binutils-2.24.51/binutils/testsuite/binutils-all/objcopy.exp binutils set test_prog "testprog.exe" } else { set test_prog "testprog" +@@ -654,6 +654,7 @@ + setup_xfail "arm*-*-pe" + setup_xfail "*-*-mingw*" + setup_xfail "*-*-cygwin*" ++ setup_xfail "*-*-msys*" + + fail $test1 + } +diff -Naur binutils-2.24.51/binutils/testsuite/binutils-all/windres/windres.exp binutils-2.24.51-msys2/binutils/testsuite/binutils-all/windres/windres.exp +--- binutils-2.24.51/binutils/testsuite/binutils-all/windres/windres.exp 2012-03-13 04:41:22.000000000 +0400 ++++ binutils-2.24.51-msys2/binutils/testsuite/binutils-all/windres/windres.exp 2013-10-24 16:05:08.402800000 +0400 +@@ -19,7 +19,7 @@ + + # Written by DJ Delorie + +-if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] && ![istarget "x86_64-*-cygwin"] } { ++if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] && ![istarget "x86_64-*-cygwin"] && ![istarget "x86_64-*-msys"] } { + verbose "Not a Cygwin/Mingw target" 1 + return + } diff -Naur binutils-2.24.51/binutils/testsuite/lib/binutils-common.exp binutils-2.24.51-msys2/binutils/testsuite/lib/binutils-common.exp --- binutils-2.24.51/binutils/testsuite/lib/binutils-common.exp 2013-05-01 21:27:46.000000000 +0400 +++ binutils-2.24.51-msys2/binutils/testsuite/lib/binutils-common.exp 2013-10-24 16:05:08.402800000 +0400 @@ -1599,10 +1619,10 @@ diff -Naur binutils-2.24.51/ld/testsuite/lib/ld-lib.exp binutils-2.24.51-msys2/l @@ -410,7 +410,7 @@ } - # Windows targets need __main, prefixed with underscore. + # Windows targets need __main, some prefixed with underscore. - if {[istarget *-*-cygwin* ] || [istarget *-*-mingw*]} { + if {[istarget *-*-cygwin* ] || [istarget *-*-mingw*] || [istarget *-*-msys*]} { - append flags " --defsym ___main=0" + append flags " --defsym __main=0 --defsym ___main=0" } @@ -1532,6 +1532,7 @@ @@ -2178,9 +2198,9 @@ diff -Naur binutils-2.24.51/opcodes/configure binutils-2.24.51-msys2/opcodes/con *-*-darwin*) SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" SHARED_DEPENDENCIES="../bfd/libbfd.la" -diff -Naur binutils-2.24.51/opcodes/configure.in binutils-2.24.51-msys2/opcodes/configure.in ---- binutils-2.24.51/opcodes/configure.in 2013-06-21 19:01:57.000000000 +0400 -+++ binutils-2.24.51-msys2/opcodes/configure.in 2013-10-24 16:05:08.605600000 +0400 +diff -Naur binutils-2.24.51/opcodes/configure.ac binutils-2.24.51-msys2/opcodes/configure.ac +--- binutils-2.24.51/opcodes/configure.ac 2013-06-21 19:01:57.000000000 +0400 ++++ binutils-2.24.51-msys2/opcodes/configure.ac 2013-10-24 16:05:08.605600000 +0400 @@ -170,6 +170,10 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"