From c6864667a61dee3ad2417531ae6dca7243de6a1b Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Tue, 22 Apr 2025 19:57:39 +0200 Subject: yasm: fix build with gcc-15 * fixes: libyasm/bitvect.h:86:32: error: cannot use keyword 'false' as enumeration constant 86 | typedef enum boolean { false = FALSE, true = TRUE } boolean; | ^~~~~ libyasm/bitvect.h:86:32: note: 'false' is a keyword with '-std=c23' onwards as suggested in: https://github.com/yasm/yasm/issues/283#issuecomment-2661108816 Signed-off-by: Martin Jansa Signed-off-by: Khem Raj --- .../yasm/0001-bitvect-fix-build-with-gcc-15.patch | 38 ++++++++++++++++++++++ meta-oe/recipes-devtools/yasm/yasm_git.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch diff --git a/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch b/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..f3f2c431d5 --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch @@ -0,0 +1,38 @@ +From 64ef740eb262f329e55eebadf2ce276b146d44e9 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Tue, 22 Apr 2025 19:06:24 +0200 +Subject: [PATCH] bitvect: fix build with gcc-15 + +* fixes: +libyasm/bitvect.h:86:32: error: cannot use keyword 'false' as enumeration constant + 86 | typedef enum boolean { false = FALSE, true = TRUE } boolean; + | ^~~~~ +../git/libyasm/bitvect.h:86:32: note: 'false' is a keyword with '-std=c23' onwards + +as suggested in: +https://github.com/yasm/yasm/issues/283#issuecomment-2661108816 + +Upstream-Status: Submitted [https://github.com/yasm/yasm/pull/287] + +Signed-off-by: Martin Jansa +--- + libyasm/bitvect.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/libyasm/bitvect.h b/libyasm/bitvect.h +index 3aee3a53..a13470ad 100644 +--- a/libyasm/bitvect.h ++++ b/libyasm/bitvect.h +@@ -83,7 +83,11 @@ typedef Z_longword *Z_longwordptr; + #ifdef MACOS_TRADITIONAL + #define boolean Boolean + #else +- typedef enum boolean { false = FALSE, true = TRUE } boolean; ++ #if __STDC_VERSION__ < 202311L ++ typedef enum boolean { false = FALSE, true = TRUE } boolean; ++ #else ++ typedef bool boolean; ++ #endif + #endif + #endif + diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb index e2c1a3c02b..de7eb45c1d 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb @@ -13,6 +13,7 @@ SRCREV = "121ab150b3577b666c79a79f4a511798d7ad2432" SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ file://0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch \ file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \ + file://0001-bitvect-fix-build-with-gcc-15.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf