Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions srcpkgs/gdb/patches/armsim-c23.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
C23 changes the meaning of fun() to be equivalent to a fun(void).

diff -rup sim/arm/armdefs.h.orig sim/arm/armdefs.h
--- a/sim/arm/armdefs.h.orig 2025-04-20 10:22:06.000000000 -0700
+++ b/sim/arm/armdefs.h 2026-05-11 12:51:37.833267581 -0700
@@ -264,7 +264,7 @@ extern ARMword ARMul_DoInstr (ARMul_Stat
\***************************************************************************/

extern void ARMul_ScheduleEvent (ARMul_State * state, unsigned long delay,
- unsigned (*func) ());
+ unsigned (*func) (ARMul_State *));
extern void ARMul_EnvokeEvent (ARMul_State * state);
extern unsigned long ARMul_Time (ARMul_State * state);


35 changes: 35 additions & 0 deletions srcpkgs/gdb/patches/d10vsim-c23.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 888a2e22a83582e437d128b6a498c2d8502a7ad0 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@adacore.com>
Date: Fri, 25 Apr 2025 11:38:34 -0600
Subject: [PATCH] Fix d10v sim build with GCC 15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The d10v sim fails when built with GCC 15. From the bug:

d10v/table.c:171:17: error: initialization of ‘void (*)(struct sim_state *, SIM_CPU *)’ {aka ‘void (*)(struct sim_state *, struct _sim_cpu *)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
171 | { 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},
| ^
d10v/table.c:171:17: note: (near initialization for ‘Simops[165].func’)

The bug here is that this is the wrong function pointer type. Since
'0' is perfectly fine here, this patch simply removes the cast.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32900
Approved-By: Tom de Vries <tdevries@suse.de>
---
sim/d10v/gencode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c
index 3a37bac6256..763e2f57a46 100644
--- a/sim/d10v/gencode.c
+++ b/sim/d10v/gencode.c
@@ -150,5 +150,5 @@ write_opcodes (void)
printf ("},\n");
}
}
- printf ("{ 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},\n};\n");
+ printf ("{ 0,0,0,0,0,0,0,0,0,{0,0,0}},\n};\n");
}
26 changes: 26 additions & 0 deletions srcpkgs/gdb/patches/simsh-c23.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 9385922d3fb9304622bbd78b2437bcfa50e7491a Mon Sep 17 00:00:00 2001
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Date: Fri, 7 Mar 2025 10:32:39 +0100
Subject: [PATCH] Fix missing int argument warning

This warning (per -Werror) breaks the build using a recent GCC
with recent userland.

Approved-By: Tom Tromey <tom@tromey.com>
---
sim/sh/interp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 379b44f82ba..c8c2a7429ce 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -1712,7 +1712,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
register int endianw = global_endianw;

int tick_start = get_now ();
- void (*prev_fpe) ();
+ void (*prev_fpe) (int);

register unsigned short *jump_table = sh_jump_table;

8 changes: 7 additions & 1 deletion srcpkgs/gdb/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'gdb'
pkgname=gdb
version=16.3
revision=2
revision=3
build_style=gnu-configure
pycompile_dirs="/usr/share/gdb/python"
configure_args="--disable-werror --disable-nls --with-system-readline
Expand Down Expand Up @@ -60,6 +60,12 @@ if [ "$build_option_multiarch" ]; then
subpackages="gdb-multiarch ${subpackages}"
fi

pre_configure() {
# --with-sysroot sets the runtime sysroot used by GDB, whereas --with-build-sysroot
# only sets the sysroot used at compile time
configure_args="${configure_args//--with-sysroot/--with-build-sysroot}"
}

post_install() {
# resolve conflicts with binutils
rm -rf ${DESTDIR}/usr/{include,lib}
Expand Down
Loading