summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-PR25447.patch35
-rw-r--r--0002-PR24511.patch32
-rw-r--r--binutils-2.37-cygwin-config-rpath.patch19
-rw-r--r--binutils-2.37-cygwin-peflags.patch31
-rw-r--r--cygwin-libbfd.spec29
-rw-r--r--sources2
6 files changed, 72 insertions, 76 deletions
diff --git a/0001-PR25447.patch b/0001-PR25447.patch
deleted file mode 100644
index 9f24939..0000000
--- a/0001-PR25447.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 82f439d028c65663a0baf0a17ef5c4a2ea5c84a7 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Tue, 11 Feb 2020 15:55:25 +0000
-Subject: [PATCH] Import a fix from the mainline sources that prevents a
- potential illegal memory access when parsing PE binaries.
-
- PR 25447
- * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
- syms and keep strings flags as these may have been set in order to
- prevent a bogus call to free.
----
- bfd/ChangeLog | 9 +++++++++
- bfd/coffgen.c | 6 ++++--
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/bfd/coffgen.c b/bfd/coffgen.c
-index 2bfcf1a6b14..3ddd2d89a83 100644
---- a/bfd/coffgen.c
-+++ b/bfd/coffgen.c
-@@ -3175,8 +3175,10 @@ _bfd_coff_close_and_cleanup (bfd *abfd)
- && bfd_family_coff (abfd)
- && coff_data (abfd) != NULL)
- {
-- obj_coff_keep_syms (abfd) = FALSE;
-- obj_coff_keep_strings (abfd) = FALSE;
-+ /* PR 25447:
-+ Do not clear the keep_syms and keep_strings flags.
-+ These may have been set by pe_ILF_build_a_bfd() indicating
-+ that the syms and strings pointers are not to be freed. */
- if (!_bfd_coff_free_symbols (abfd))
- return FALSE;
- }
---
-2.18.2
-
diff --git a/0002-PR24511.patch b/0002-PR24511.patch
deleted file mode 100644
index a763d41..0000000
--- a/0002-PR24511.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 40bfb9762747f8336b17c70a0173d10200fa62eb Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Thu, 27 Feb 2020 17:28:47 +1030
-Subject: [PATCH] Re: PR24511, nm should not mark symbols in .init_array as "t"
-
- PR 24511
- * syms.c (bfd_decode_symclass): Reverse order of coff_section_type
- and decode_section_type calls.
----
- bfd/ChangeLog | 6 ++++++
- bfd/syms.c | 4 ++--
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/bfd/syms.c b/bfd/syms.c
-index 128cf191453..8a8b74f3f92 100644
---- a/bfd/syms.c
-+++ b/bfd/syms.c
-@@ -705,9 +705,9 @@ bfd_decode_symclass (asymbol *symbol)
- c = 'a';
- else if (symbol->section)
- {
-- c = decode_section_type (symbol->section);
-+ c = coff_section_type (symbol->section->name);
- if (c == '?')
-- c = coff_section_type (symbol->section->name);
-+ c = decode_section_type (symbol->section);
- }
- else
- return '?';
---
-2.18.2
-
diff --git a/binutils-2.37-cygwin-config-rpath.patch b/binutils-2.37-cygwin-config-rpath.patch
new file mode 100644
index 0000000..1fe0b1b
--- /dev/null
+++ b/binutils-2.37-cygwin-config-rpath.patch
@@ -0,0 +1,19 @@
+--- a/config.rpath
++++ b/config.rpath
+@@ -438,7 +438,14 @@
+ bsdi4*)
+ ;;
+ cygwin* | mingw* | pw32*)
+- shrext=.dll
++ case "$TOOLCHAIN_TARGET" in
++ i686-w64-mingw32 | x86_64-w64-mingw32)
++ shrext=.dll.a
++ ;;
++ *)
++ shrext=.dll
++ ;;
++ esac
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+
diff --git a/binutils-2.37-cygwin-peflags.patch b/binutils-2.37-cygwin-peflags.patch
new file mode 100644
index 0000000..d4356c6
--- /dev/null
+++ b/binutils-2.37-cygwin-peflags.patch
@@ -0,0 +1,31 @@
+--- a/ld/emultempl/pe.em 2021-01-09 11:47:34.000000000 +0100
++++ b/ld/emultempl/pe.em 2021-02-28 09:40:12.547395700 +0100
+@@ -104,8 +104,12 @@ fragment <<EOF
+ #define DEFAULT_PSEUDO_RELOC_VERSION 1
+ #endif
+
++#if defined(__CYGWIN__) || defined (__MINGW32__)
++#define DEFAULT_DLL_CHARACTERISTICS (0)
++#else
+ #define DEFAULT_DLL_CHARACTERISTICS (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE \
+ | IMAGE_DLL_CHARACTERISTICS_NX_COMPAT)
++#endif
+
+ #if defined(TARGET_IS_i386pe) || ! defined(DLL_SUPPORT)
+ #define PE_DEF_SUBSYSTEM 3
+--- a/ld/emultempl/pep.em 2021-01-09 11:47:34.000000000 +0100
++++ b/ld/emultempl/pep.em 2021-02-28 09:40:52.328116000 +0100
+@@ -99,9 +99,13 @@ fragment <<EOF
+ #define DLL_SUPPORT
+ #endif
+
++#if defined(__CYGWIN__) || defined (__MINGW32__)
++#define DEFAULT_DLL_CHARACTERISTICS (0)
++#else
+ #define DEFAULT_DLL_CHARACTERISTICS (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE \
+ | IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA \
+ | IMAGE_DLL_CHARACTERISTICS_NX_COMPAT)
++#endif
+
+ #if defined(TARGET_IS_i386pep) || ! defined(DLL_SUPPORT)
+ #define PE_DEF_SUBSYSTEM 3
diff --git a/cygwin-libbfd.spec b/cygwin-libbfd.spec
index 6017add..98a13e0 100644
--- a/cygwin-libbfd.spec
+++ b/cygwin-libbfd.spec
@@ -1,7 +1,7 @@
%{?cygwin_package_header}
Name: cygwin-libbfd
-Version: 2.34
+Version: 2.37
Release: 1%{?dist}
Summary: Cygwin BFD and opcodes libraries
@@ -10,9 +10,9 @@ Group: Development/Libraries
URL: http://www.gnu.org/software/binutils/
BuildArch: noarch
-Source0: http://ftpmirror.gnu.org/binutils/binutils-%{version}.tar.xz
-Patch1: 0001-PR25447.patch
-Patch2: 0002-PR24511.patch
+Source0: https://ftpmirror.gnu.org/binutils/binutils-%{version}.tar.xz
+Patch1: binutils-2.37-cygwin-config-rpath.patch
+Patch2: binutils-2.37-cygwin-peflags.patch
BuildRequires: gcc
BuildRequires: flex
@@ -68,16 +68,17 @@ unstable to be used dynamically.
%build
%cygwin_configure \
+ --enable-64-bit-bfd \
--without-included-gettext \
--enable-install-libiberty \
--disable-win32-registry \
--disable-werror
-%cygwin_make %{?_smp_flags} all-libiberty all-opcodes all-bfd
+%cygwin_make %{?_smp_flags} all-libiberty all-opcodes all-bfd all-libctf
%install
-%cygwin_make DESTDIR=$RPM_BUILD_ROOT install-libiberty install-opcodes install-bfd
+%cygwin_make DESTDIR=$RPM_BUILD_ROOT install-libiberty install-opcodes install-bfd install-libctf
# These files conflict with ordinary binutils.
rm -rf $RPM_BUILD_ROOT%{cygwin32_infodir}
@@ -93,13 +94,16 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{cygwin32_includedir}/ansidecl.h
%{cygwin32_includedir}/bfd.h
%{cygwin32_includedir}/bfdlink.h
-%{cygwin32_includedir}/bfd_stdint.h
+%{cygwin32_includedir}/ctf.h
+%{cygwin32_includedir}/ctf-api.h
%{cygwin32_includedir}/diagnostics.h
%{cygwin32_includedir}/dis-asm.h
%{cygwin32_includedir}/plugin-api.h
%{cygwin32_includedir}/symcat.h
%{cygwin32_includedir}/libiberty/
%{cygwin32_libdir}/libbfd.a
+%{cygwin32_libdir}/libctf.a
+%{cygwin32_libdir}/libctf-nobfd.a
%{cygwin32_libdir}/libiberty.a
%{cygwin32_libdir}/libopcodes.a
@@ -107,18 +111,27 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{cygwin64_includedir}/ansidecl.h
%{cygwin64_includedir}/bfd.h
%{cygwin64_includedir}/bfdlink.h
-%{cygwin64_includedir}/bfd_stdint.h
+%{cygwin64_includedir}/ctf.h
+%{cygwin64_includedir}/ctf-api.h
%{cygwin64_includedir}/diagnostics.h
%{cygwin64_includedir}/dis-asm.h
%{cygwin64_includedir}/plugin-api.h
%{cygwin64_includedir}/symcat.h
%{cygwin64_includedir}/libiberty/
%{cygwin64_libdir}/libbfd.a
+%{cygwin64_libdir}/libctf.a
+%{cygwin64_libdir}/libctf-nobfd.a
%{cygwin64_libdir}/libiberty.a
%{cygwin64_libdir}/libopcodes.a
%changelog
+* Thu Aug 26 2021 Yaakov Selkowitz <yselkowi@redhat.com> - 2.37-1
+- new version
+
+* Wed Apr 1 2020 Yaakov Selkowitz <yselkowi@redhat.com> - 2.34-1
+- new version
+
* Thu Dec 20 2018 Yaakov Selkowitz <yselkowi@redhat.com> - 2.31.1-1
- new version
diff --git a/sources b/sources
index ef80505..b8c6109 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (binutils-2.34.tar.xz) = 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
+SHA512 (binutils-2.37.tar.xz) = 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7