ipxe: fix build with gcc-15
PATCH 1/3 ipxe: fix build with gcc-15
From: Martin Jansa <[email protected]>
* fixes:
http://errors.yoctoproject.org/Errors/Details/853265/
Signed-off-by Martin Jansa <[email protected]>
--- ...ld-Fix-typo-in-xenver.h-header-guard.patch | 25 ++ ...ld-Fix-old-style-function-definition.patch | 25 ++ ...ent-the-use-of-reserved-words-in-C23.patch | 103 ++++++ ...afe-disable-function-wrapper-from-le.patch | 294 ++++++++++++++++++ recipes-extended/ipxe/ipxe_git.bb | 4 + 5 files changed, 451 insertions(+) create mode 100644 recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch create mode 100644 recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch create mode 100644 recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch create mode 100644 recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch
recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch new file +25 -0
@@ -0,0 +1,25 @@ +From e4795a590e3b708008a7bbd944370aef5337c561 Mon Sep 17 00:00:00 2001 +From: Michael Brown <[email protected]> +Date: Sun, 27 Apr 2025 17:33:28 +0100 +Subject: [PATCH] [build] Fix typo in xenver.h header guard + +GCC 15 helpfully reports mismatched #ifdef and #define lines in header +guards. + +Signed-off-by: Michael Brown <[email protected]> +Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] +--- + src/include/ipxe/xenver.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/include/ipxe/xenver.h b/src/include/ipxe/xenver.h +index b29dfb321..5d820a6e7 100644 +--- a/src/include/ipxe/xenver.h ++++ b/src/include/ipxe/xenver.h +@@ -1,5 +1,5 @@ + #ifndef _IPXE_XENVER_H +-#define _IPXE_VENVER_H ++#define _IPXE_XENVER_H + + /** @file + *
recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 0b5e26f82d3bb5dc49557b8c29d802911c050aaf Mon Sep 17 00:00:00 2001 +From: Michael Brown <[email protected]> +Date: Sun, 27 Apr 2025 17:36:52 +0100 +Subject: [PATCH] [build] Fix old-style function definition + +Signed-off-by: Michael Brown <[email protected]> +Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] +--- + src/drivers/net/3c595.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c +index 92d38cfc5..c3442946e 100644 +--- a/src/drivers/net/3c595.c ++++ b/src/drivers/net/3c595.c +@@ -342,8 +342,7 @@ eeprom_rdy() + * before + */ + static int +-get_e(offset) +-int offset; ++get_e(int offset) + { + if (!eeprom_rdy()) + return (0xffff);
recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch new file +103 -0
103 lines not on this page · raw message
recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch new file +294 -0
294 lines not on this page · raw message
recipes-extended/ipxe/ipxe_git.bb +4 -0
@@ -19,6 +19,10 @@ SRC_URI = " \ file://ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch \ file://ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch \ file://build-be-explicit-about-fcommon-compiler-directive.patch \ + file://0001-build-Fix-typo-in-xenver.h-header-guard.patch;patchdir=.. \ + file://0002-build-Fix-old-style-function-definition.patch;patchdir=.. \ + file://0003-build-Prevent-the-use-of-reserved-words-in-C23.patch;patchdir=.. \ + file://0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch;patchdir=.. \ " FILES:${PN} = "/usr/share/firmware/*.rom"
PATCH 2/3 irqbalance: fix build with gcc-15
From: Martin Jansa <[email protected]>
* fixes:
http://errors.yoctoproject.org/Errors/Details/853261/
Signed-off-by Martin Jansa <[email protected]>
--- ...01-add-void-to-fix-strict-prototypes.patch | 298 ++++++++++++++++++ recipes-extended/irqbalance/irqbalance_git.bb | 1 + 2 files changed, 299 insertions(+) create mode 100644 recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch
recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch new file +298 -0
@@ -0,0 +1,298 @@ +From c25dfc295df789ceb1ed890ab7e5a9694503d829 Mon Sep 17 00:00:00 2001 +From: Rosen Penev <[email protected]> +Date: Sun, 31 Mar 2024 14:31:22 -0700 +Subject: [PATCH] add void to fix strict-prototypes + +This becomes a hard error with C23 + +Signed-off-by: Rosen Penev <[email protected]> +Upstream-Status: Backport [https://github.com/Irqbalance/irqbalance/commit/b6a831d692ed7e12db7748db49b3b39516d151d2] +--- + irqbalance.c | 2 +- + irqbalance.h | 2 +- + procinterrupts.c | 2 +- + ui/helpers.c | 2 +- + ui/helpers.h | 2 +- + ui/irqbalance-ui.c | 4 ++-- + ui/irqbalance-ui.h | 5 ++--- + ui/ui.c | 24 ++++++++++++------------ + ui/ui.h | 26 +++++++++++++------------- + 9 files changed, 34 insertions(+), 35 deletions(-) + +diff --git a/irqbalance.c b/irqbalance.c +index e8d9ba9..d7b4184 100644 +--- a/irqbalance.c ++++ b/irqbalance.c +@@ -554,7 +554,7 @@ out: + return TRUE; + } + +-int init_socket() ++int init_socket(void) + { + struct sockaddr_un addr; + memset(&addr, 0, sizeof(struct sockaddr_un)); +diff --git a/irqbalance.h b/irqbalance.h +index e7f6b94..96ee07a 100644 +--- a/irqbalance.h ++++ b/irqbalance.h +@@ -36,7 +36,7 @@ extern char *classes[]; + extern void parse_cpu_tree(void); + extern void clear_work_stats(void); + extern void parse_proc_interrupts(void); +-extern GList* collect_full_irq_list(); ++extern GList* collect_full_irq_list(void); + extern void parse_proc_stat(void); + extern void set_interrupt_count(int number, uint64_t count); + extern void set_msi_interrupt_numa(int number); +diff --git a/procinterrupts.c b/procinterrupts.c +index 9015177..938cfad 100644 +--- a/procinterrupts.c ++++ b/procinterrupts.c +@@ -204,7 +204,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) + info->name = strdup(irq_fullname); + } + +-GList* collect_full_irq_list() ++GList* collect_full_irq_list(void) + { + GList *tmp_list = NULL; + FILE *file; +diff --git a/ui/helpers.c b/ui/helpers.c +index 5d71275..14861cb 100644 +--- a/ui/helpers.c ++++ b/ui/helpers.c +@@ -163,7 +163,7 @@ void dump_node(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void dump_tree() ++void dump_tree(void) + { + for_each_node(tree, dump_node, NULL); + } +diff --git a/ui/helpers.h b/ui/helpers.h +index b8d9fcc..922914b 100644 +--- a/ui/helpers.h ++++ b/ui/helpers.h +@@ -25,7 +25,7 @@ void for_each_node(GList *list, void (*fp)(cpu_node_t *node, void *data), void * + + void dump_irq(irq_t *irq, void *data __attribute__((unused))); + void dump_node(cpu_node_t *node, void *data __attribute__((unused))); +-void dump_tree(); ++void dump_tree(void); + + + #endif /* HELPERS_H */ +diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c +index 3ad3553..132bb45 100644 +--- a/ui/irqbalance-ui.c ++++ b/ui/irqbalance-ui.c +@@ -23,7 +23,7 @@ GMainLoop *main_loop; + int is_tree = 1; + static int default_bufsz = 8192; + +-struct msghdr * create_credentials_msg() ++struct msghdr * create_credentials_msg(void) + { + struct ucred *credentials = malloc(sizeof(struct ucred)); + credentials->pid = getpid(); +@@ -46,7 +46,7 @@ struct msghdr * create_credentials_msg() + return msg; + } + +-int init_connection() ++int init_connection(void) + { + struct sockaddr_un addr; + memset(&addr, 0, sizeof(struct sockaddr_un)); +diff --git a/ui/irqbalance-ui.h b/ui/irqbalance-ui.h +index fba7e7c..e9f6114 100644 +--- a/ui/irqbalance-ui.h ++++ b/ui/irqbalance-ui.h +@@ -70,8 +70,8 @@ typedef struct setup { + + /* Function prototypes */ + +-struct msghdr * create_credentials_msg(); +-int init_connection(); ++struct msghdr * create_credentials_msg(void); ++int init_connection(void); + void send_settings(char *data); + char * get_data(char *string); + void parse_setup(char *setup_data); +@@ -81,7 +81,6 @@ void assign_cpu_lists(cpu_node_t *node, void *data); + void assign_cpu_mask(cpu_node_t *node, void *data); + void parse_into_tree(char *data); + gboolean rescan_tree(gpointer data); +-int main(); + + + #endif /* IRQBALANCE_UI_H */ +diff --git a/ui/ui.c b/ui/ui.c +index 6ff3305..bc1d743 100644 +--- a/ui/ui.c ++++ b/ui/ui.c +@@ -17,7 +17,7 @@ char *IRQ_CLASS_TO_STR[] = { + "10-Gigabit Ethernet", + "Virt Event"}; + +-void show_frame() ++void show_frame(void) + { + int i; + attrset(COLOR_PAIR(4)); +@@ -33,7 +33,7 @@ void show_frame() + } + } + +-void show_footer() ++void show_footer(void) + { + char footer[COLS]; + snprintf(footer, COLS - 1, +@@ -149,7 +149,7 @@ void print_cpu_line(cpu_ban_t *cpu, void *data) + (*line_offset)++; + } + +-void print_all_cpus() ++void print_all_cpus(void) + { + if(all_cpus == NULL) { + for_each_node(tree, get_cpu, NULL); +@@ -168,7 +168,7 @@ void add_banned_cpu(int *banned_cpu, void *data) + snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu); + } + +-void display_banned_cpus() ++void display_banned_cpus(void) + { + char banned_cpus[1024] = "Banned CPU numbers: \0"; + if(g_list_length(setup.banned_cpus) > 0) { +@@ -221,7 +221,7 @@ void get_cpu(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void handle_cpu_banning() ++void handle_cpu_banning(void) + { + GList *tmp = g_list_copy_deep(all_cpus, copy_cpu_ban, NULL); + attrset(COLOR_PAIR(5)); +@@ -371,7 +371,7 @@ void print_irq_line(irq_t *irq, void *data) + + } + +-void print_all_irqs() ++void print_all_irqs(void) + { + int *line = malloc(sizeof(int)); + *line = 4; +@@ -418,13 +418,13 @@ void copy_irqs_from_nodes(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void get_all_irqs() ++void get_all_irqs(void) + { + all_irqs = g_list_copy_deep(setup.banned_irqs, copy_irq, NULL); + for_each_node(tree, copy_irqs_from_nodes, NULL); + } + +-void handle_irq_banning() ++void handle_irq_banning(void) + { + GList *tmp = g_list_copy_deep(all_irqs, copy_irq, NULL); + attrset(COLOR_PAIR(5)); +@@ -520,7 +520,7 @@ void handle_irq_banning() + } + } + +-void init() ++void init(void) + { + signal(SIGINT, close_window); + initscr(); +@@ -556,7 +556,7 @@ void close_window(int sig __attribute__((unused))) + exit(EXIT_SUCCESS); + } + +-void settings() ++void settings(void) + { + clear(); + char *setup_data = get_data(SETUP); +@@ -620,7 +620,7 @@ void settings() + free(setup_data); + } + +-void setup_irqs() ++void setup_irqs(void) + { + clear(); + get_all_irqs(); +@@ -720,7 +720,7 @@ void display_tree_node(cpu_node_t *node, void *data) + } + } + +-void display_tree() ++void display_tree(void) + { + clear(); + char *setup_data = get_data(SETUP); +diff --git a/ui/ui.h b/ui/ui.h +index 0aa8280..bb017e9 100644 +--- a/ui/ui.h ++++ b/ui/ui.h +@@ -15,39 +15,39 @@ extern GList *tree; + extern setup_t setup; + extern int is_tree; + +-void show_frame(); +-void show_footer(); ++void show_frame(void); ++void show_footer(void); + + char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset); + int get_valid_sleep_input(int column_offest); + + void get_banned_cpu(int *cpu, void *data); + void print_cpu_line(cpu_ban_t *cpu, void *data); +-void print_all_cpus(); ++void print_all_cpus(void); + void add_banned_cpu(int *banned_cpu, void *data); +-void display_banned_cpus(); ++void display_banned_cpus(void); + int toggle_cpu(GList *cpu_list, int cpu_number); + void get_new_cpu_ban_values(cpu_ban_t *cpu, void *data); +-void get_cpu(); +-void handle_cpu_banning(); ++void get_cpu(cpu_node_t *node, void *data); ++void handle_cpu_banning(void); + + void copy_assigned_obj(int *number, void *data); + void print_assigned_objects_string(irq_t *irq, int *line_offset); + void print_irq_line(irq_t *irq, void *data); +-void print_all_irqs(); ++void print_all_irqs(void); + int toggle_irq(GList *irq_list, int position); + void get_new_irq_ban_values(irq_t *irq, void *data); + void copy_irqs_from_nodes(cpu_node_t *node, void *data); +-void get_all_irqs(); +-void handle_irq_banning(); ++void get_all_irqs(void); ++void handle_irq_banning(void); + +-void init(); ++void init(void); + void close_window(int sig); +-void settings(); +-void setup_irqs(); ++void settings(void); ++void setup_irqs(void); + void display_tree_node_irqs(irq_t *irq, void *data); + void display_tree_node(cpu_node_t *node, void *data); +-void display_tree(); ++void display_tree(void); + + + #endif /* UI_H */
recipes-extended/irqbalance/irqbalance_git.bb +1 -0
@@ -10,6 +10,7 @@ PV = "1.8.0+git" SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \ file://add-initscript.patch \ file://irqbalance-Add-status-and-reload-commands.patch \ + file://0001-add-void-to-fix-strict-prototypes.patch \ " S = "${WORKDIR}/git"
PATCH 3/3 libvmi: ignore incompatible-pointer-types
In reply to [email protected]From: Martin Jansa <[email protected]>
* temporary work around to unblock gcc-15 upgrade in oe-core
Signed-off-by Martin Jansa <[email protected]>
--- recipes-extended/libvmi/libvmi_git.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
recipes-extended/libvmi/libvmi_git.bb +17 -0
@@ -41,3 +41,20 @@ do_install:append () { # Construction of grammar.h is not parallel safe. PARALLEL_MAKE = "-j1" + +# http://errors.yoctoproject.org/Errors/Details/853259/ +# tools/vmifs/vmifs.c:129:18: error: initialization of 'void (*)(void *)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] +# examples/process-list.c:120:64: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:122:63: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:124:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:127:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:129:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:131:60: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:135:65: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:137:64: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:141:60: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/process-list.c:143:59: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/dump-memory.c:185:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/win-offsets.c:287:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] +# examples/dmesg.c:146:80: error: passing argument 4 of 'vmi_get_struct_size_from_json' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types"