summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-03-27 09:45:30 +0000
committerDavid Howells <dhowells@redhat.com>2014-03-27 10:35:50 +0000
commit5884884b79c5dc1b988cba779d1a860d5dd15486 (patch)
tree1d30fc03d6735225dd7626a28cb69b726bcbe77d
parent322d22f34e44a2c989be6e1765125a947ae3e973 (diff)
downloadcross-binutils-5884884b79c5dc1b988cba779d1a860d5dd15486.tar.gz
cross-binutils-5884884b79c5dc1b988cba779d1a860d5dd15486.tar.xz
cross-binutils-5884884b79c5dc1b988cba779d1a860d5dd15486.zip
Fix formatless sprintf in Score
-rw-r--r--cross-binutils-2.24-score-sprintf.patch24
-rw-r--r--cross-binutils.spec8
2 files changed, 32 insertions, 0 deletions
diff --git a/cross-binutils-2.24-score-sprintf.patch b/cross-binutils-2.24-score-sprintf.patch
new file mode 100644
index 0000000..86ebc11
--- /dev/null
+++ b/cross-binutils-2.24-score-sprintf.patch
@@ -0,0 +1,24 @@
+diff -ur -x '*~' binutils-2.24/gas/config/tc-score7.c score-2.24/gas/config/tc-score7.c
+--- binutils-2.24/gas/config/tc-score7.c 2013-11-04 15:33:37.000000000 +0000
++++ score-2.24/gas/config/tc-score7.c 2014-03-27 09:18:21.168567604 +0000
+@@ -5337,7 +5337,7 @@
+ || ((pec_part_1.size == s7_INSN16_SIZE) && (s7_inst.size == s7_INSN_SIZE)))
+ {
+ s7_inst.error = _("pce instruction error (16 bit || 16 bit)'");
+- sprintf (s7_inst.str, insnstr);
++ sprintf (s7_inst.str, "%s", insnstr);
+ return;
+ }
+
+diff -ur -x '*~' binutils-2.24/gas/config/tc-score.c score-2.24/gas/config/tc-score.c
+--- binutils-2.24/gas/config/tc-score.c 2013-11-04 15:33:37.000000000 +0000
++++ score-2.24/gas/config/tc-score.c 2014-03-27 09:19:25.576796431 +0000
+@@ -5363,7 +5363,7 @@
+ || ((pec_part_1.size == s3_INSN16_SIZE) && (s3_inst.size == s3_INSN_SIZE)))
+ {
+ s3_inst.error = _("pce instruction error (16 bit || 16 bit)'");
+- sprintf (s3_inst.str, insnstr);
++ sprintf (s3_inst.str, "%s", insnstr);
+ return;
+ }
+
diff --git a/cross-binutils.spec b/cross-binutils.spec
index 63bb92b..586a583 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -83,6 +83,9 @@ Patch15: binutils-2.24-elfnn-aarch64.patch
# Fix decoding of abstract instance names using DW_FORM_ref_addr.
Patch16: binutils-2.24-DW_FORM_ref_addr.patch
+# Fix formatless sprintfs in Score-specific code.
+Patch100: cross-binutils-2.24-score-sprintf.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.
@@ -211,6 +214,8 @@ cd %{srcdir}
%patch15 -p0 -b .elf-aarch64~
%patch16 -p0 -b .ref-addr~
+%patch100 -p1 -b .score~
+
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
# On ppc64 we might use 64KiB pages
@@ -651,6 +656,9 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Thu Mar 27 2014 David Howells <dhowells@redhat.com> - 2.24-1
+- Fix formatless sprintfs in Score.
+
* Wed Mar 26 2014 David Howells <dhowells@redhat.com> - 2.24-1
- Update to binutils-2.24-1.
- Add metag arch support.