clang does not recognise -Wmaybe-uninitialized and errors on the -Wno-error form under -Werror,-Wunknown-warning-option apply it only for the gcc toolchain.
Signed-off-by: Khem Raj <[email protected]> --- meta-oe/recipes-support/gd/gd_2.3.3.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-oe/recipes-support/gd/gd_2.3.3.bb b/meta-oe/recipes-support/gd/gd_2.3.3.bb index 884a2b54ac..e7f8b56fd7 100644 --- a/meta-oe/recipes-support/gd/gd_2.3.3.bb +++ b/meta-oe/recipes-support/gd/gd_2.3.3.bb @@ -43,9 +43,11 @@ EXTRA_OECONF += "--disable-rpath" EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"' -CFLAGS += "-Wno-error=maybe-uninitialized" +# -Wmaybe-uninitialized is a GCC-only option; clang does not recognise it and +# errors out on -Wno-error=maybe-uninitialized (-Werror,-Wunknown-warning-option). +CFLAGS += "${@bb.utils.contains('TOOLCHAIN', 'gcc', '-Wno-error=maybe-uninitialized', '', d)}" -DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized" +DEBUG_OPTIMIZATION:append = " ${@bb.utils.contains('TOOLCHAIN', 'gcc', '-Wno-error=maybe-uninitialized', '', d)}" do_install:append:class-target() { # cleanup buildpaths from gdlib.pc
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#127917): https://lists.openembedded.org/g/openembedded-devel/message/127917 Mute This Topic: https://lists.openembedded.org/mt/120018139/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
