diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2025-04-26 15:41:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-04-29 09:55:31 +0100 |
commit | ffd02fb1f7f306e55cd096c9b587d1f9b7a0151c (patch) | |
tree | 11ff62ec35c19f6a85ff79af4a5aed9f37c840c6 | |
parent | f0714461021881b15fcfe5dfd824c22dcb623257 (diff) | |
download | poky-ffd02fb1f7f306e55cd096c9b587d1f9b7a0151c.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: aada741d57e181ff35e0715012513dc9d669eaef)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 baf37b0a9b..af512a42b4 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" |