public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] ghostscript: Do not treat declaration-after-statement warning as error
@ 2025-10-06 21:48 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2025-10-06 21:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

This option is added by ghostscript and is passed down to its modules
e.g. brotli, brotli does expect c99 or newer standard and hence uses
declarations after statement. This option causes compiler e.g. clang
to find this warning and treat it as error on 32bit builds

./brotli/c/dec/decode.c:440:12: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
  440 |   uint32_t __fastload_table = (*table);
      |            ^
1 error generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb b/meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb
index 4f6cb454122..4cea8984328 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb
@@ -47,7 +47,7 @@ EXTRA_OECONF:append:mipsarcho32 = " --with-large_color_index=0"
 EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
 EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
 
-TARGET_CFLAGS += "-std=gnu17 -fPIC"
+TARGET_CFLAGS += "-std=gnu17 -Wno-error=declaration-after-statement -fPIC"
 
 # Uses autoconf but not automake, can't do out-of-tree
 inherit autotools-brokensep pkgconfig


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-06 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 21:48 [PATCH] ghostscript: Do not treat declaration-after-statement warning as error Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox