aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-07 23:11:24 -0800
committerArmin Kuster <akuster808@gmail.com>2019-02-04 21:35:13 -0800
commitd9f0e0e6638321067b977a8e29dcfae02020fc33 (patch)
treeaafc14b891fb8efc6b91164345582e3cef46cf03
parentc48d9e29f3cf83f386784437806935b80d1fdbb6 (diff)
downloadmeta-openembedded-d9f0e0e6638321067b977a8e29dcfae02020fc33.tar.gz
meta-openembedded-d9f0e0e6638321067b977a8e29dcfae02020fc33.tar.bz2
meta-openembedded-d9f0e0e6638321067b977a8e29dcfae02020fc33.zip
modemmanager: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch30
-rw-r--r--meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb2
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch
new file mode 100644
index 000000000..dcbe01d5e
--- /dev/null
+++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch
@@ -0,0 +1,30 @@
+From d4f73b037d11d20f080e74c05df28853fb833075 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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])
diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb
index dec4b6797..01c621441 100644
--- a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb
+++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb
@@ -12,6 +12,7 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion
DEPENDS = "glib-2.0 libgudev dbus-glib intltool-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] = "a49c9f73e46c7b89e5efedda250d22c0"
@@ -33,6 +34,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"
FILES_${PN} += " \
${datadir}/icons \