diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2025-03-21 10:27:11 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-03-21 11:07:33 -0700 |
| commit | d760c1acce26ddef132e17c35e5e66976e6789ef (patch) | |
| tree | 4e2d9f28d08f499802a34837dd7fb54b2588c203 | |
| parent | d6810ba581f15fe677feddfd955c82bcb7c53012 (diff) | |
| download | meta-openembedded-d760c1acce26ddef132e17c35e5e66976e6789ef.tar.gz | |
libconfig: fix build with gcc-15
* backport fix from:
https://github.com/hyperrealm/libconfig/commit/690342b9cbc8b39787a1501bd890d63ca63a003c
to fix:
http://errors.yoctoproject.org/Errors/Details/848457/
grammar.y:58:33: error: too many arguments to function 'libconfig_yyget_lineno'; expected 0, have 1
* need to add bison-native dependency while grammar.y is modified
with the above patch to fix:
http://errors.yoctoproject.org/Errors/Details/848472/
../aux-build/ylwrap: line 174: yacc: command not found
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/libconfig/libconfig/0001-Fix-declarations-to-allow-build-with-gcc-15.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb | 7 |
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/libconfig/libconfig/0001-Fix-declarations-to-allow-build-with-gcc-15.patch b/meta-oe/recipes-extended/libconfig/libconfig/0001-Fix-declarations-to-allow-build-with-gcc-15.patch new file mode 100644 index 0000000000..00ceadb10d --- /dev/null +++ b/meta-oe/recipes-extended/libconfig/libconfig/0001-Fix-declarations-to-allow-build-with-gcc-15.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 0511e285f3c886a388b8e9c6a4829752d60ab44c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
| 3 | Date: Thu, 5 Dec 2024 06:47:40 +0000 | ||
| 4 | Subject: [PATCH] Fix declarations to allow build with gcc 15 | ||
| 5 | |||
| 6 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 7 | |||
| 8 | Upstream-Status: Backport [690342b Fix declarations to allow build with gcc 15] | ||
| 9 | --- | ||
| 10 | lib/grammar.y | 8 ++++++-- | ||
| 11 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/lib/grammar.y b/lib/grammar.y | ||
| 14 | index 87dac00..0e9d0bb 100644 | ||
| 15 | --- a/lib/grammar.y | ||
| 16 | +++ b/lib/grammar.y | ||
| 17 | @@ -40,8 +40,7 @@ | ||
| 18 | #include "wincompat.h" | ||
| 19 | |||
| 20 | /* These declarations are provided to suppress compiler warnings. */ | ||
| 21 | -extern int libconfig_yylex(); | ||
| 22 | -extern int libconfig_yyget_lineno(); | ||
| 23 | +extern int libconfig_yyget_lineno(void *); | ||
| 24 | |||
| 25 | static const char *err_array_elem_type = "mismatched element type in array"; | ||
| 26 | static const char *err_duplicate_setting = "duplicate setting name"; | ||
| 27 | @@ -80,6 +79,11 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, | ||
| 28 | char *sval; | ||
| 29 | } | ||
| 30 | |||
| 31 | +%{ | ||
| 32 | +/* These declarations are provided to suppress compiler warnings. */ | ||
| 33 | +extern int libconfig_yylex(YYSTYPE *, void *); | ||
| 34 | +%} | ||
| 35 | + | ||
| 36 | %token <ival> TOK_BOOLEAN TOK_INTEGER TOK_HEX | ||
| 37 | %token <llval> TOK_INTEGER64 TOK_HEX64 | ||
| 38 | %token <fval> TOK_FLOAT | ||
diff --git a/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb b/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb index ad030b8f4a..a4df707dd7 100644 --- a/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb +++ b/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb | |||
| @@ -7,7 +7,12 @@ SECTION = "libs" | |||
| 7 | LICENSE = "LGPL-2.1-only" | 7 | LICENSE = "LGPL-2.1-only" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29" | 8 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29" |
| 9 | 9 | ||
| 10 | SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz" | 10 | SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz \ |
| 11 | file://0001-Fix-declarations-to-allow-build-with-gcc-15.patch \ | ||
| 12 | " | ||
| 13 | |||
| 14 | # needed when we modify grammar.y with above patch | ||
| 15 | DEPENDS += "bison-native" | ||
| 11 | 16 | ||
| 12 | UPSTREAM_CHECK_URI = "https://github.com/hyperrealm/libconfig/releases" | 17 | UPSTREAM_CHECK_URI = "https://github.com/hyperrealm/libconfig/releases" |
| 13 | UPSTREAM_CHECK_REGEX = "Version (?P<pver>\d+(\.\d+)+)" | 18 | UPSTREAM_CHECK_REGEX = "Version (?P<pver>\d+(\.\d+)+)" |
