summaryrefslogtreecommitdiff
path: root/games-emulation/mupen64plus-core/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-18 13:00:52 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-18 13:00:52 +0100
commite0722f6145f1e8db6281ff135d83442091b31620 (patch)
treee12d701878d995460a24779bd4e1d7689acbeb78 /games-emulation/mupen64plus-core/files
parentdcb9c4187a31b8b770600503289d2ad39745e782 (diff)
gentoo auto-resync : 18:07:2023 - 13:00:52
Diffstat (limited to 'games-emulation/mupen64plus-core/files')
-rw-r--r--games-emulation/mupen64plus-core/files/mupen64plus-core-2.5.9-debugger-fix-binutils-2.39-compat.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/games-emulation/mupen64plus-core/files/mupen64plus-core-2.5.9-debugger-fix-binutils-2.39-compat.patch b/games-emulation/mupen64plus-core/files/mupen64plus-core-2.5.9-debugger-fix-binutils-2.39-compat.patch
new file mode 100644
index 000000000000..b87a259ff809
--- /dev/null
+++ b/games-emulation/mupen64plus-core/files/mupen64plus-core-2.5.9-debugger-fix-binutils-2.39-compat.patch
@@ -0,0 +1,53 @@
+diff --git a/projects/unix/Makefile b/projects/unix/Makefile
+index d48d8830..e4792b4e 100755
+--- a/projects/unix/Makefile
++++ b/projects/unix/Makefile
+@@ -714,15 +714,19 @@ ifeq ($(DEBUGGER), 1)
+ $(SRCDIR)/debugger/dbg_breakpoints.c
+ LDLIBS += -lopcodes -lbfd
+
+- # UGLY libopcodes version check (we check for > 2.28)
++ # UGLY libopcodes/libbfd version check (we check for >= 2.28 and >= 2.39)
+ LIBOPCODES_VERSION := $(shell $(STRINGS) --version | head -n1 | rev | cut -d ' ' -f1 | rev)
+ LIBOPCODES_MAJOR := $(shell echo $(LIBOPCODES_VERSION) | cut -f1 -d.)
+ LIBOPCODES_MINOR := $(shell echo $(LIBOPCODES_VERSION) | cut -f2 -d.)
+ LIBOPCODES_POINT := $(shell echo $(LIBOPCODES_VERSION) | cut -f3 -d.)
+ LIBOPCODES_GE_2_29 := $(shell [ $(LIBOPCODES_MAJOR) -gt 2 -o \( $(LIBOPCODES_MAJOR) -eq 2 -a $(LIBOPCODES_MINOR) -ge 29 \) -o \( $(LIBOPCODES_MAJOR) -eq 2 -a $(LIBOPCODES_MINOR) -eq 28 -a $(LIBOPCODES_POINT) -ge 1 \) ] && echo true)
++ LIBBFD_GE_2_39 := $(shell [ $(LIBOPCODES_MAJOR) -gt 2 -o \( $(LIBOPCODES_MAJOR) -eq 2 -a $(LIBOPCODES_MINOR) -ge 29 \) -o \( $(LIBOPCODES_MAJOR) -eq 2 -a $(LIBOPCODES_MINOR) -eq 39 -a $(LIBOPCODES_POINT) -ge 1 \) ] && echo true)
+ ifeq ($(LIBOPCODES_GE_2_29),true)
+ CFLAGS += -DUSE_LIBOPCODES_GE_2_29
+ endif
++ ifeq ($(LIBBFD_GE_2_39),true)
++ CFLAGS += -DUSE_LIBBFD_GE_2_39
++ endif
+ endif
+
+ ifeq ($(OPENCV), 1)
+diff --git a/src/debugger/dbg_memory.c b/src/debugger/dbg_memory.c
+index e98bf081..32c2af27 100644
+--- a/src/debugger/dbg_memory.c
++++ b/src/debugger/dbg_memory.c
+@@ -97,9 +97,23 @@ static int read_memory_func(bfd_vma memaddr, bfd_byte *myaddr, unsigned int leng
+ return (0);
+ }
+
++#ifdef USE_LIBBFD_GE_2_39
++static int fprintf_styled_nop(void *out __attribute__((unused)),
++ enum disassembler_style s __attribute__((unused)),
++ const char *fmt __attribute__((unused)),
++ ...)
++{
++ return 0;
++}
++#endif
++
+ void init_host_disassembler(void)
+ {
++#ifdef USE_LIBBFD_GE_2_39
++ INIT_DISASSEMBLE_INFO(dis_info, stderr, process_opcode_out, fprintf_styled_nop);
++#else
+ INIT_DISASSEMBLE_INFO(dis_info, stderr, process_opcode_out);
++#endif
+ dis_info.fprintf_func = (fprintf_ftype) process_opcode_out;
+ dis_info.stream = stderr;
+ dis_info.bytes_per_line=1;