[oe-commits] [meta-openembedded] 22/24: libqmi: Replace clang patch with configure option

git at git.openembedded.org git at git.openembedded.org
Fri Sep 13 16:26:46 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 4a80e37005f0951bf70aee664a058f7911940cb0
Author: Adrian Bunk <bunk at stusta.de>
AuthorDate: Fri Sep 13 16:13:54 2019 +0300

    libqmi: Replace clang patch with configure option
    
    Signed-off-by: Adrian Bunk <bunk at stusta.de>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../libqmi/libqmi/0001-Detect-clang.patch          | 85 ----------------------
 .../recipes-connectivity/libqmi/libqmi_1.22.2.bb   |  2 +-
 2 files changed, 1 insertion(+), 86 deletions(-)

diff --git a/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch b/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch
deleted file mode 100644
index 7a3429b..0000000
--- a/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 4cfb728804157e8f3c69e11ba4df449d8f76388f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem at gmail.com>
-Date: Thu, 20 Oct 2016 04:42:26 +0000
-Subject: [PATCH] Detect clang
-
-Check for clang compiler since we need to disable
-unused-function warning for clang, at same time
-pass werror when checking for compiler options if
-werror is enabled so spurious options do not get
-enabled. Only the ones that are supported by given
-compiler are accepted.
-
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
-Upstream-Status: Pending
-
----
- m4/compiler-warnings.m4 | 29 +++++++++++++++++++++++++----
- 1 file changed, 25 insertions(+), 4 deletions(-)
-
-diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4
-index de4a8b0..e4ba718 100644
---- a/m4/compiler-warnings.m4
-+++ b/m4/compiler-warnings.m4
-@@ -2,10 +2,30 @@ AC_DEFUN([LIBQMI_COMPILER_WARNINGS],
- [AC_ARG_ENABLE(more-warnings,
- 	AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
- 	set_more_warnings="$enableval",set_more_warnings=error)
-+
-+# Clang throws a lot of warnings when it does not understand a flag. Disable
-+# this warning for now so other warnings are visible.
-+AC_MSG_CHECKING([if compiling with clang])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
-+#ifndef __clang__
-+	not clang
-+#endif
-+	]])],
-+	[CLANG=yes],
-+	[CLANG=no]
-+)
-+AC_MSG_RESULT([$CLANG])
-+AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function])
-+CFLAGS="$CFLAGS $CLANG_FLAGS"
-+LDFLAGS="$LDFLAGS $CLANG_FLAGS"
-+
- AC_MSG_CHECKING(for more warnings)
- if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- 	AC_MSG_RESULT(yes)
- 	CFLAGS="-Wall -std=gnu89 $CFLAGS"
-+	if test "x$set_more_warnings" = xerror; then
-+		WERROR="-Werror"
-+	fi
- 
- 	for option in -Wmissing-declarations -Wmissing-prototypes \
- 		      -Wdeclaration-after-statement -Wstrict-prototypes \
-@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- 		      -Wmissing-include-dirs -Waggregate-return \
- 		      -Wformat-security -Wtype-limits; do
- 		SAVE_CFLAGS="$CFLAGS"
--		CFLAGS="$CFLAGS $option"
-+		CFLAGS="$CFLAGS $option $WERROR"
- 		AC_MSG_CHECKING([whether gcc understands $option])
- 		AC_TRY_COMPILE([], [],
- 			has_option=yes,
- 			has_option=no,)
- 		if test $has_option = no; then
- 			CFLAGS="$SAVE_CFLAGS"
-+		else
-+			CFLAGS="$SAVE_CFLAGS $option"
- 		fi
- 		AC_MSG_RESULT($has_option)
- 		unset has_option
- 		unset SAVE_CFLAGS
- 	done
-+	CFLAGS="$CFLAGS $WERROR"
- 	unset option
--	if test "x$set_more_warnings" = xerror; then
--		CFLAGS="$CFLAGS -Werror"
--	fi
-+	unset WERROR
- else
- 	AC_MSG_RESULT(no)
- fi
--- 
-1.9.1
-
diff --git a/meta-oe/recipes-connectivity/libqmi/libqmi_1.22.2.bb b/meta-oe/recipes-connectivity/libqmi/libqmi_1.22.2.bb
index da13286..3b2fe51 100644
--- a/meta-oe/recipes-connectivity/libqmi/libqmi_1.22.2.bb
+++ b/meta-oe/recipes-connectivity/libqmi/libqmi_1.22.2.bb
@@ -12,7 +12,6 @@ DEPENDS = "glib-2.0 glib-2.0-native"
 inherit autotools pkgconfig bash-completion
 
 SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
-           file://0001-Detect-clang.patch \
            "
 SRC_URI[md5sum] = "3fd831c1b0de4a4432be628432a960ff"
 SRC_URI[sha256sum] = "f1f1e514a89b1dcba05cf7274895e7301a2da4c947b7c2f17acb84fc74038227"
@@ -21,3 +20,4 @@ PACKAGECONFIG ??= "udev mbim"
 PACKAGECONFIG[udev] = ",--without-udev,libgudev"
 PACKAGECONFIG[mbim] = "--enable-mbim-qmux,--disable-mbim-qmux,libmbim"
 
+EXTRA_OECONF_append_toolchain-clang = " --enable-more-warnings=no"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list