modemmanager: Use a simpler workaround for the clang build
PATCH 1/1 modemmanager: Use a simpler workaround for the clang build
The check whether the compiler understands an option is broken in m4/compiler_warnings.m4, but if we are just workarounding it then do a minimal workaround without patching.
--- ...-not-set-Wno-unused-but-set-variable.patch | 30 ------------------- .../modemmanager/modemmanager_1.10.0.bb | 3 +- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch
meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From d4f73b037d11d20f080e74c05df28853fb833075 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Fri, 7 Dec 2018 22:59:47 -0800 -Subject: [PATCH] Do not set Wno-unused-but-set-variable - -This is gcc specific warning, not implemented by pretending to be gcc -like compilers e.g. clang. - -We will pass this option from recipe - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Khem Raj <[email protected]> ---- - m4/compiler_warnings.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4 -index f498a28..e65e97f 100644 ---- a/m4/compiler_warnings.m4 -+++ b/m4/compiler_warnings.m4 -@@ -11,7 +11,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - -Wdeclaration-after-statement -Wstrict-prototypes \ - -Wno-unused-parameter -Wno-sign-compare \ - -Wno-deprecated-declarations \ -- -Wno-unused-but-set-variable -Wformat-security; do -+ -Wno-unused -Wformat-security; do - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option" - AC_MSG_CHECKING([whether gcc understands $option])
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb +1 -2
@@ -12,7 +12,6 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion DEPENDS = "glib-2.0 libgudev intltool-native libxslt-native" SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \ - file://0001-Do-not-set-Wno-unused-but-set-variable.patch \ " SRC_URI[md5sum] = "92d25176d0cc9d588ca29700b33c7d98" SRC_URI[sha256sum] = "fd0f39996025dac96995daea8a58ec7dd571582f7563a8ae0d5f65b571b76ee2"
@@ -33,7 +32,7 @@ PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" EXTRA_OECONF = " \ --with-udev-base-dir=${nonarch_base_libdir}/udev \ " -CFLAGS_append_toolchain-gcc = " -Wno-unused-but-set-variable" +EXTRA_OECONF_append_toolchain-clang = " --enable-more-warnings=no" FILES_${PN} += " \ ${datadir}/icons \
Signature · 1 line
2.17.1
Quoted 61 lines · Adrian Bunk
The check whether the compiler understands an option is broken in m4/compiler_warnings.m4, but if we are just workarounding it then do a minimal workaround without patching.
Signed-off-by Adrian Bunk <[email protected]>--- ...-not-set-Wno-unused-but-set-variable.patch | 30 ------------------- .../modemmanager/modemmanager_1.10.0.bb | 3 +- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patchmeta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch deleted +0
-30@@ -1,30 +0,0 @@ -From d4f73b037d11d20f080e74c05df28853fb833075 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Fri, 7 Dec 2018 22:59:47 -0800 -Subject: [PATCH] Do not set Wno-unused-but-set-variable - -This is gcc specific warning, not implemented by pretending to be gcc -like compilers e.g. clang. - -We will pass this option from recipe - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Khem Raj <[email protected]> ---- - m4/compiler_warnings.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4 -index f498a28..e65e97f 100644 ---- a/m4/compiler_warnings.m4 -+++ b/m4/compiler_warnings.m4 -@@ -11,7 +11,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - -Wdeclaration-after-statement -Wstrict-prototypes \ - -Wno-unused-parameter -Wno-sign-compare \ - -Wno-deprecated-declarations \ -- -Wno-unused-but-set-variable -Wformat-security; do -+ -Wno-unused -Wformat-security; do - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option" - AC_MSG_CHECKING([whether gcc understands $option])meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb +0
-1@@ -12,7 +12,6 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion DEPENDS = "glib-2.0 libgudev intltool-native libxslt-native" SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \ - file://0001-Do-not-set-Wno-unused-but-set-variable.patch \ " SRC_URI[md5sum] = "92d25176d0cc9d588ca29700b33c7d98" SRC_URI[sha256sum] = "fd0f39996025dac96995daea8a58ec7dd571582f7563a8ae0d5f65b571b76ee2"
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" · line 36
Quoted 6 lines
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb +1
-1@@ -33,7 +32,7 @@ PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" EXTRA_OECONF = " \ --with-udev-base-dir=${nonarch_base_libdir}/udev \ " -CFLAGS_append_toolchain-gcc = " -Wno-unused-but-set-variable" +EXTRA_OECONF_append_toolchain-clang = " --enable-more-warnings=no"
I think this will disable extra warnings but since the patch was anyway doing same although just for one warning
this is fine by me. I still would like to have an option to be able to build with default warning set and have easy way for OE devs to fix/report such issues to package upstream instead of masking them out.
Quoted 10 lines
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb +0
-1FILES_${PN} += " \ ${datadir}/icons \ --2.17.1
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Quoted 13 lines · Khem Raj
On Tue, Aug 6, 2019 at 8:39 AM Adrian Bunk <[email protected]> wrote:
...meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" · line 36
Quoted 7 lines
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.10.0.bb +1
-1@@ -33,7 +32,7 @@ PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" EXTRA_OECONF = " \ --with-udev-base-dir=${nonarch_base_libdir}/udev \ " -CFLAGS_append_toolchain-gcc = " -Wno-unused-but-set-variable" +EXTRA_OECONF_append_toolchain-clang = " --enable-more-warnings=no"I think this will disable extra warnings but since the patch was anyway doing same although just for one warning
this is fine by me.
And it's only for clang.
Quoted 4 lines
I still would like to have an option to be able to build with default warning set and have easy way for OE devs to fix/report such issues to package upstream instead of masking them out.
If someone wants to fix or report warnings upstream, then a stable release that might be years behind upstream master is usually not a good starting point - when you are upstream in OE you are also not very enthusiastic when people send patches for Yocto 2.0 today.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed