summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-06 11:54:32 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2018-12-20 00:55:36 +0000
commitf2d7b948c11e7dc3e4ea58b4dd5b0b2ebdbe13d0 (patch)
treed155eb7b6995f3f5335c73a08a7edc1c461cc428
parentb8fade938e684a5dda8c978689e914c5d11baf2e (diff)
downloadmeta-qt5-f2d7b948c11e7dc3e4ea58b4dd5b0b2ebdbe13d0.tar.gz
qtconnectivity: Ignore -Waddress-of-temporary when using clang
Helps in making bluez detection succeed Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/qt5/qtconnectivity/0001-Ignore-clang-warning-about-address-of-temp-in-config.patch40
-rw-r--r--recipes-qt/qt5/qtconnectivity_git.bb2
2 files changed, 42 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtconnectivity/0001-Ignore-clang-warning-about-address-of-temp-in-config.patch b/recipes-qt/qt5/qtconnectivity/0001-Ignore-clang-warning-about-address-of-temp-in-config.patch
new file mode 100644
index 00000000..a0c2ee72
--- /dev/null
+++ b/recipes-qt/qt5/qtconnectivity/0001-Ignore-clang-warning-about-address-of-temp-in-config.patch
@@ -0,0 +1,40 @@
1From 162749d36f4bdea62d456516ae2bbcdc84b9ba87 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 6 Dec 2018 13:21:23 -0800
4Subject: [PATCH] Ignore clang warning about address of temp in
5 config.tests/bluez
6
7There is a similar error with gcc which is suppressed by using
8-fpermissive, clang however is more concerned and has specific flag for
9it, this flag is not implemented in gcc so we can not use it via general
10cmdline options to compiler, so resort to using diagnostic pragma
11
12Upstream-Status: Pending
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 config.tests/bluez/main.cpp | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/config.tests/bluez/main.cpp b/config.tests/bluez/main.cpp
20index 3fe5ee09..8d1c968a 100644
21--- a/config.tests/bluez/main.cpp
22+++ b/config.tests/bluez/main.cpp
23@@ -30,11 +30,14 @@
24
25 int main()
26 {
27+#pragma clang diagnostic push
28+#pragma clang diagnostic ignored "-Waddress-of-temporary"
29 #ifdef BDADDR_NONE
30 bacmp(BDADDR_ANY, BDADDR_NONE);
31 #else
32 bacmp(BDADDR_ANY, BDADDR_LOCAL);
33 #endif
34+#pragma clang diagnostic pop
35
36 return 0;
37 }
38--
392.19.2
40
diff --git a/recipes-qt/qt5/qtconnectivity_git.bb b/recipes-qt/qt5/qtconnectivity_git.bb
index da0b9259..0e13bfd5 100644
--- a/recipes-qt/qt5/qtconnectivity_git.bb
+++ b/recipes-qt/qt5/qtconnectivity_git.bb
@@ -20,3 +20,5 @@ PACKAGECONFIG[bluez] = "-feature-bluez,-no-feature-bluez,${BLUEZ}"
20EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}" 20EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
21 21
22SRCREV = "d1cf8dad0e6d8d08b5c6f2f08d85a0e75b0bcf8a" 22SRCREV = "d1cf8dad0e6d8d08b5c6f2f08d85a0e75b0bcf8a"
23
24SRC_URI += "file://0001-Ignore-clang-warning-about-address-of-temp-in-config.patch"