diff --git a/binutils-use-long-long.patch b/binutils-use-long-long.patch new file mode 100644 index 0000000..1ea7418 --- /dev/null +++ b/binutils-use-long-long.patch @@ -0,0 +1,38 @@ +diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac +--- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000 ++++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000 +@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then ++fi ++if test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" +- if test "x${ac_cv_sizeof_void_p}" = "x8"; then ++ if test "x${ac_cv_sizeof_void_p}" = "x8" \ ++ -a "x${ac_cv_sizeof_long}" != "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi + fi +diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure +--- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100 ++++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100 +@@ -12819,11 +12819,13 @@ + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then ++fi ++if test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" +- if test "x${ac_cv_sizeof_void_p}" = "x8"; then ++ if test "x${ac_cv_sizeof_void_p}" = "x8" \ ++ -a "x${ac_cv_sizeof_long}" != "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi + fi diff --git a/binutils.spec b/binutils.spec index 5ddd2d1..75f04bc 100644 --- a/binutils.spec +++ b/binutils.spec @@ -39,7 +39,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.35.1 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -295,6 +295,14 @@ Patch28: binutils-SHF_LINK_ORDER.patch # Lifetime: Fixed in 2.36 Patch29: binutils-duplicate-sections.patch +# Purpose: Use the "unsigned long long" type for pointers on hosts where +# long is a 32-bit type but pointers are a 64-bit type. Necessary +# because users expect to be able to install both the i686- and +# x86_64 versions of binutils-devel on the same machine, so they +# need to identical versions of the bfd.h header file. +# Lifetime: Permanent. +Patch30: binutils-use-long-long.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -874,6 +882,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue Jan 12 2021 Nick Clifton - 2.35.1-21 +- Ensure that bfd.h is the same for i686- and x86_64 versions of the devel rpm. (#1915317) + * Fri Jan 08 2021 Nick Clifton - 2.35.1-20 - Fix bug running readelf on an empty file. (#1903448)