diff --git a/cross-binutils-2.25-fixup-for-sh64.patch b/cross-binutils-2.25-fixup-for-sh64.patch new file mode 100644 index 0000000..a9d8f88 --- /dev/null +++ b/cross-binutils-2.25-fixup-for-sh64.patch @@ -0,0 +1,13 @@ +--- binutils-2.24/bfd/elf64-sh64.c.old ++++ binutils-2.24/bfd/elf64-sh64.c +@@ -2894,6 +2894,10 @@ static void + sh64_elf64_final_write_processing (bfd *abfd, + bfd_boolean linker ATTRIBUTE_UNUSED) + { ++ /* PR 17288: Make sure that the SH5 flag is set. */ ++ if (elf_elfheader (abfd)->e_flags == 0) ++ elf_elfheader (abfd)->e_flags |= EF_SH5; ++ + /* FIXME: Perhaps we shouldn't do this if the entry address was supplied + numerically, but we currently lack the infrastructure to recognize + that: The entry symbol, and info whether it is numeric or a symbol diff --git a/cross-binutils.spec b/cross-binutils.spec index 4e41426..5e40f4b 100644 --- a/cross-binutils.spec +++ b/cross-binutils.spec @@ -85,6 +85,9 @@ Patch13: binutils-2.23.2-aarch64-em.patch # Fix detections little endian PPC shared libraries Patch14: binutils-2.24-ldforcele.patch +# Fix formatless sprintfs in Score-specific code. +Patch100: cross-binutils-2.25-fixup-for-sh64.patch + Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel # BZ 920545: We need pod2man in order to build the manual pages. @@ -215,6 +218,8 @@ cd %{srcdir} %patch14 -p1 -b .ldforcele~ %endif +%patch100 -p1 -b .sh64-fixup~ + # We cannot run autotools as there is an exact requirement of autoconf-2.59. # On ppc64 we might use 64KiB pages @@ -658,6 +663,7 @@ rm -rf %{buildroot} %changelog * Wed Jan 7 2015 David Howells - 2.25-2 - Fix up the target for SH64 and cease mixing 32-bit SH targets with SH64. +- SH64: Work around flags not getting set on incremental link of .a into .o [binutils bz 17288]. * Mon Jan 5 2015 David Howells - 2.25-1 - Sync with binutils-2.25 to pick up fixes.