diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2025-08-22 00:43:01 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-09-01 08:30:56 -0700 |
commit | 7de652686657eea29974a24cf3a1a698a08edd08 (patch) | |
tree | a5617b72be562351044ba639d4daa8c1c5b129a1 | |
parent | 6b639e19757b7321347eeb811c470a00b0735851 (diff) | |
download | poky-7de652686657eea29974a24cf3a1a698a08edd08.tar.gz |
pkgconfig: fix build with gcc-15
* on hosts with gcc-15 or whenever glib PACKAGECONFIG isn't enabled
and pkgconfig uses own old bundled glib
* fixes:
http://errors.yoctoproject.org/Errors/Details/853015/
../../../git/glib/glib/goption.c:169:14: error: two or more data types in declaration specifiers
169 | gboolean bool;
| ^~~~
../../../git/glib/glib/goption.c:169:18: warning: declaration does not declare anything
169 | gboolean bool;
| ^
(From OE-Core rev: 948e0170d83949e2d5a676afb81edc44f07c5ba4)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch | 36 | ||||
-rw-r--r-- | meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch b/meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch new file mode 100644 index 0000000000..bcb7e94d69 --- /dev/null +++ b/meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From b3b26a7e125e5e4f5b69975cc17eb6d33198ebaa Mon Sep 17 00:00:00 2001 | ||
2 | From: Emmanuele Bassi <ebassi@gnome.org> | ||
3 | Date: Thu, 11 Apr 2024 14:40:21 +0100 | ||
4 | Subject: [PATCH] Do not use bool as a field name | ||
5 | |||
6 | C99 aliases `bool` to `_Bool`, and C23 introduces `bool` as a reserved | ||
7 | keyword. Let's avoid using `bool` as a field name. | ||
8 | |||
9 | Upstream-Status: Backport [Backport from glib to bunlded version in pkg-config https://github.com/GNOME/glib/commit/9e320e1c43a4770ed1532248fe5416eb0c618120] | ||
10 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
11 | --- | ||
12 | glib/glib/goption.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/glib/glib/goption.c b/glib/glib/goption.c | ||
16 | index 0a22f6f..f439fd4 100644 | ||
17 | --- a/glib/glib/goption.c | ||
18 | +++ b/glib/glib/goption.c | ||
19 | @@ -166,7 +166,7 @@ typedef struct | ||
20 | gpointer arg_data; | ||
21 | union | ||
22 | { | ||
23 | - gboolean bool; | ||
24 | + gboolean boolean; | ||
25 | gint integer; | ||
26 | gchar *str; | ||
27 | gchar **array; | ||
28 | @@ -1600,7 +1600,7 @@ free_changes_list (GOptionContext *context, | ||
29 | switch (change->arg_type) | ||
30 | { | ||
31 | case G_OPTION_ARG_NONE: | ||
32 | - *(gboolean *)change->arg_data = change->prev.bool; | ||
33 | + *(gboolean *)change->arg_data = change->prev.boolean; | ||
34 | break; | ||
35 | case G_OPTION_ARG_INT: | ||
36 | *(gint *)change->arg_data = change->prev.integer; | ||
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index 16e6c5b609..c67c526aa5 100644 --- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | |||
@@ -15,6 +15,7 @@ SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master; | |||
15 | file://pkg-config-esdk.in \ | 15 | file://pkg-config-esdk.in \ |
16 | file://pkg-config-native.in \ | 16 | file://pkg-config-native.in \ |
17 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ | 17 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ |
18 | file://0001-Do-not-use-bool-as-a-field-name.patch \ | ||
18 | " | 19 | " |
19 | 20 | ||
20 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |