summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-06-16 16:58:55 +0100
committerDavid Howells <dhowells@redhat.com>2014-06-16 17:04:08 +0100
commitcab55cf2a5d1795c3e27fa2ba0d1dac2293f8a46 (patch)
tree9f13e60f548ac0f163b26ca767db0ac441f48604
parent057864be46e85a6461080a94260c6574c9385708 (diff)
downloadcross-binutils-cab55cf2a5d1795c3e27fa2ba0d1dac2293f8a46.tar.gz
cross-binutils-cab55cf2a5d1795c3e27fa2ba0d1dac2293f8a46.tar.xz
cross-binutils-cab55cf2a5d1795c3e27fa2ba0d1dac2293f8a46.zip
Fix gcc-4.9 new compile error in tc-m68k.c in gas.HEADmaster
Ignore this: ../../binutils-2.24/gas/config/tc-m68k.c: In function 'md_assemble': ../../binutils-2.24/gas/config/tc-m68k.c:4516:36: error: array subscript is below array bounds [-Werror=array-bounds] n = (the_ins.numo - the_ins.fragb[n - 1].fragoff); which is caught by gcc-4.9 and not by gcc-4.8
-rw-r--r--cross-binutils-2.24-m68k-gcc-error.patch11
-rw-r--r--cross-binutils.spec5
2 files changed, 16 insertions, 0 deletions
diff --git a/cross-binutils-2.24-m68k-gcc-error.patch b/cross-binutils-2.24-m68k-gcc-error.patch
new file mode 100644
index 0000000..0281e72
--- /dev/null
+++ b/cross-binutils-2.24-m68k-gcc-error.patch
@@ -0,0 +1,11 @@
+--- binutils-2.24/gas/config/tc-m68k.c.old 2014-06-16 16:54:53.752365338 +0100
++++ binutils-2.24/gas/config/tc-m68k.c 2014-06-16 16:55:11.151441285 +0100
+@@ -4513,7 +4513,7 @@
+ (relax_substateT) (the_ins.fragb[n].fragty),
+ the_ins.fragb[n].fadd, the_ins.fragb[n].foff, to_beg_P);
+ }
+- n = (the_ins.numo - the_ins.fragb[n - 1].fragoff);
++ n = (n > 0) ? (the_ins.numo - the_ins.fragb[n - 1].fragoff) : 0;
+ shorts_this_frag = 0;
+ if (n)
+ {
diff --git a/cross-binutils.spec b/cross-binutils.spec
index e18e51d..fa0c381 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -96,6 +96,7 @@ Patch19: binutils-2.24-ldforcele.patch
# Fix formatless sprintfs in Score-specific code.
Patch100: cross-binutils-2.24-score-sprintf.patch
Patch101: binutils-2.24-kernel-ld-r-fix.patch
+Patch102: cross-binutils-2.24-m68k-gcc-error.patch
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
@@ -231,6 +232,7 @@ cd %{srcdir}
%patch100 -p1 -b .score~
%patch101 -p0 -b .kernel-ld-r-fix~
+%patch102 -p1 -b .m68k-config-fix~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@@ -676,6 +678,9 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Mon Jun 16 2014 David Howells <dhowells@redhat.com> - 2.24-4
+- Fix gcc-4.9 new compile error in m68k handler in gas.
+
* Wed Jun 11 2014 David Howells <dhowells@redhat.com> - 2.24-4
- Sync with binutils-2.24-15 fixing the bfd_set_section_alignment() error [BZ 1106093]
- Apply the changes on binutils-2_24-branch in git to cab6c3ee9785f072a373afe31253df0451db93cf.