diff options
| author | Michael Forney <mforney@mforney.org> | 2021-05-01 00:38:36 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-05-01 01:54:36 -0700 |
| commit | 485e1926967a43f9d945d8b940f88f606295fc53 (patch) | |
| tree | d925a47b1a8e95bb2dc567b6d17ab530ccf423b5 /pkg/binutils/patch | |
| parent | 61073911d2dacdfd42b0be34b6d8b870431915f0 (diff) | |
binutils: Portability fix
Diffstat (limited to 'pkg/binutils/patch')
| -rw-r--r-- | pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch | 47 |
1 files changed, 47 insertions, 0 deletions
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 new file mode 100644 index 00000000..c7574697 --- /dev/null +++ b/pkg/binutils/patch/0004-dwarf-Don-t-omit-second-operand-of-operator.patch @@ -0,0 +1,47 @@ +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 + |
