diff options
-rw-r--r-- | meta/recipes-devtools/unifdef/unifdef/0001-Don-t-use-C23-constexpr-keyword.patch | 57 | ||||
-rw-r--r-- | meta/recipes-devtools/unifdef/unifdef_2.12.bb | 3 |
2 files changed, 59 insertions, 1 deletions
diff --git a/meta/recipes-devtools/unifdef/unifdef/0001-Don-t-use-C23-constexpr-keyword.patch b/meta/recipes-devtools/unifdef/unifdef/0001-Don-t-use-C23-constexpr-keyword.patch new file mode 100644 index 0000000000..9d02183930 --- /dev/null +++ b/meta/recipes-devtools/unifdef/unifdef/0001-Don-t-use-C23-constexpr-keyword.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From ca1ac9c8bde84dbdea972299b1a6e30e78c2d785 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sam James <sam@gentoo.org> | ||
3 | Date: Sun, 17 Nov 2024 01:26:27 +0000 | ||
4 | Subject: [PATCH] Don't use C23 constexpr keyword | ||
5 | |||
6 | This fixes building with upcoming GCC 15 which defaults to -std=gnu23. | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/fanf2/unifdef/pull/19] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | unifdef.c | 10 +++++----- | ||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/unifdef.c b/unifdef.c | ||
15 | index dc145a2..4bd3bda 100644 | ||
16 | --- a/unifdef.c | ||
17 | +++ b/unifdef.c | ||
18 | @@ -202,7 +202,7 @@ static int depth; /* current #if nesting */ | ||
19 | static int delcount; /* count of deleted lines */ | ||
20 | static unsigned blankcount; /* count of blank lines */ | ||
21 | static unsigned blankmax; /* maximum recent blankcount */ | ||
22 | -static bool constexpr; /* constant #if expression */ | ||
23 | +static bool is_constexpr; /* constant #if expression */ | ||
24 | static bool zerosyms; /* to format symdepth output */ | ||
25 | static bool firstsym; /* ditto */ | ||
26 | |||
27 | @@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) | ||
28 | *valp = (value[sym] != NULL); | ||
29 | lt = *valp ? LT_TRUE : LT_FALSE; | ||
30 | } | ||
31 | - constexpr = false; | ||
32 | + is_constexpr = false; | ||
33 | } else if (!endsym(*cp)) { | ||
34 | debug("eval%d symbol", prec(ops)); | ||
35 | sym = findsym(&cp); | ||
36 | @@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) | ||
37 | lt = *valp ? LT_TRUE : LT_FALSE; | ||
38 | cp = skipargs(cp); | ||
39 | } | ||
40 | - constexpr = false; | ||
41 | + is_constexpr = false; | ||
42 | } else { | ||
43 | debug("eval%d bad expr", prec(ops)); | ||
44 | return (LT_ERROR); | ||
45 | @@ -1170,10 +1170,10 @@ ifeval(const char **cpp) | ||
46 | long val = 0; | ||
47 | |||
48 | debug("eval %s", *cpp); | ||
49 | - constexpr = killconsts ? false : true; | ||
50 | + is_constexpr = killconsts ? false : true; | ||
51 | ret = eval_table(eval_ops, &val, cpp); | ||
52 | debug("eval = %d", val); | ||
53 | - return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); | ||
54 | + return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); | ||
55 | } | ||
56 | |||
57 | /* | ||
diff --git a/meta/recipes-devtools/unifdef/unifdef_2.12.bb b/meta/recipes-devtools/unifdef/unifdef_2.12.bb index 3e08b3a0a4..bf0f3e1b17 100644 --- a/meta/recipes-devtools/unifdef/unifdef_2.12.bb +++ b/meta/recipes-devtools/unifdef/unifdef_2.12.bb | |||
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3498caf346f6b77934882101749ada23 \ | |||
8 | file://unifdef.c;endline=32;md5=6f4ee8085d6e6ab0f7cb4390e1a9c497 \ | 8 | file://unifdef.c;endline=32;md5=6f4ee8085d6e6ab0f7cb4390e1a9c497 \ |
9 | " | 9 | " |
10 | 10 | ||
11 | SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz" | 11 | SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz \ |
12 | file://0001-Don-t-use-C23-constexpr-keyword.patch" | ||
12 | SRC_URI[md5sum] = "ae8c0b3b4c43c1f6bc5f32412a820818" | 13 | SRC_URI[md5sum] = "ae8c0b3b4c43c1f6bc5f32412a820818" |
13 | SRC_URI[sha256sum] = "43ce0f02ecdcdc723b2475575563ddb192e988c886d368260bc0a63aee3ac400" | 14 | SRC_URI[sha256sum] = "43ce0f02ecdcdc723b2475575563ddb192e988c886d368260bc0a63aee3ac400" |
14 | 15 | ||