]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
ghostscript: Do not treat declaration-after-statement warning as error
authorKhem Raj <raj.khem@gmail.com>
Mon, 6 Oct 2025 21:48:48 +0000 (14:48 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Oct 2025 09:27:02 +0000 (10:27 +0100)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb

index 4f6cb454122b07f2c62d3d005efec1e8b7bd31d7..4cea89843283e6ee1b3392a53c07f4e4d573fff8 100644 (file)
@@ -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