summaryrefslogtreecommitdiff
path: root/pkg/binutils/patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/binutils/patch')
-rw-r--r--pkg/binutils/patch/0002-Adjust-style-to-prevent-gcc-warning.patch (renamed from pkg/binutils/patch/0003-Adjust-style-to-prevent-gcc-warning.patch)0
-rw-r--r--pkg/binutils/patch/0002-bfd-Don-t-use-long-double-if-not-available.patch48
-rw-r--r--pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch27
-rw-r--r--pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch47
4 files changed, 27 insertions, 95 deletions
diff --git a/pkg/binutils/patch/0003-Adjust-style-to-prevent-gcc-warning.patch b/pkg/binutils/patch/0002-Adjust-style-to-prevent-gcc-warning.patch
index 6ecd7636..6ecd7636 100644
--- a/pkg/binutils/patch/0003-Adjust-style-to-prevent-gcc-warning.patch
+++ b/pkg/binutils/patch/0002-Adjust-style-to-prevent-gcc-warning.patch
diff --git a/pkg/binutils/patch/0002-bfd-Don-t-use-long-double-if-not-available.patch b/pkg/binutils/patch/0002-bfd-Don-t-use-long-double-if-not-available.patch
deleted file mode 100644
index e298e79d..00000000
--- a/pkg/binutils/patch/0002-bfd-Don-t-use-long-double-if-not-available.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 6ff69e64d952818f144829d87e7948bc9004ba80 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Sun, 19 May 2019 13:48:45 -0700
-Subject: [PATCH] bfd: Don't use long double if not available
-
----
- bfd/bfd.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/bfd/bfd.c b/bfd/bfd.c
-index f194433883..81648b259d 100644
---- a/bfd/bfd.c
-+++ b/bfd/bfd.c
-@@ -862,7 +862,9 @@ union _bfd_doprnt_args
- long l;
- long long ll;
- double d;
-+#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
- long double ld;
-+#endif
- void *p;
- enum
- {
-@@ -871,7 +873,9 @@ union _bfd_doprnt_args
- Long,
- LongLong,
- Double,
-+#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
- LongDouble,
-+#endif
- Ptr
- } type;
- };
-@@ -1347,9 +1351,11 @@ error_handler_internal (const char *fmt, va_list ap)
- case Double:
- args[i].d = va_arg (ap, double);
- break;
-+#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
- case LongDouble:
- args[i].ld = va_arg (ap, long double);
- break;
-+#endif
- case Ptr:
- args[i].p = va_arg (ap, void *);
- break;
---
-2.30.0
-
diff --git a/pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch b/pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch
new file mode 100644
index 00000000..5b3dd3a1
--- /dev/null
+++ b/pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch
@@ -0,0 +1,27 @@
+From 412191da499f4f96dd9138a2868b16947b8d8f70 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 19 Jul 2021 10:31:05 -0700
+Subject: [PATCH] Avoid void pointer arithmetic
+
+This is not strictly allowed in ISO C, which requires the pointed-to
+type to be a complete object type.
+---
+ bfd/peicode.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bfd/peicode.h b/bfd/peicode.h
+index c84b135e1eb..41955975cdc 100644
+--- a/bfd/peicode.h
++++ b/bfd/peicode.h
+@@ -1474,7 +1474,7 @@ pe_bfd_object_p (bfd * abfd)
+ if (opt_hdr_size != 0)
+ {
+ bfd_size_type amt = opt_hdr_size;
+- void * opthdr;
++ bfd_byte * opthdr;
+
+ /* PR 17521 file: 230-131433-0.004. */
+ if (amt < sizeof (PEAOUTHDR))
+--
+2.32.0
+
diff --git a/pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch b/pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch
deleted file mode 100644
index c7574697..00000000
--- a/pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From d1fc503c4b4b5558d974e0fb7245ed801c734f82 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Sat, 1 May 2021 00:37:01 -0700
-Subject: [PATCH] dwarf: Don't omit second operand of '?' operator
-
-This is a GNU C extension and is not valid in ISO C.
----
- binutils/ChangeLog | 4 ++++
- binutils/dwarf.c | 10 +++++++---
- 2 files changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 8b08bd0db79..43073320aaa 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,7 @@
-+2021-05-01 Michael Forney <mforney@mforney.org>
-+
-+ * dwarf.c: Don't omit second operand of '?' operator.
-+
- 2021-02-06 Nick Clifton <nickc@redhat.com>
-
- This is the 2.36.1 release.
-diff --git a/binutils/dwarf.c b/binutils/dwarf.c
-index 19475e6cec3..f72fc8d8da8 100644
---- a/binutils/dwarf.c
-+++ b/binutils/dwarf.c
-@@ -3738,9 +3738,13 @@ process_debug_info (struct dwarf_section * section,
- offset_size == 8 ? "64-bit" : "32-bit");
- printf (_(" Version: %d\n"), compunit.cu_version);
- if (compunit.cu_version >= 5)
-- printf (_(" Unit Type: %s (%x)\n"),
-- get_DW_UT_name (compunit.cu_unit_type) ?: "???",
-- compunit.cu_unit_type);
-+ {
-+ const char *name = get_DW_UT_name (compunit.cu_unit_type);
-+
-+ printf (_(" Unit Type: %s (%x)\n"),
-+ name ? name : "???",
-+ compunit.cu_unit_type);
-+ }
- printf (_(" Abbrev Offset: 0x%s\n"),
- dwarf_vmatoa ("x", compunit.cu_abbrev_offset));
- printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);
---
-2.31.1
-