summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-05-22 22:24:00 -0700
committerKhem Raj <raj.khem@gmail.com>2018-05-26 21:10:55 -0700
commit51c6624684a5acfceb2feeb8bd9bfa7f744c1526 (patch)
tree67f0a364becfcf1d3b09fa5b3d21239d031be419
parent8b7834aba887c67bd2d01e94b2e867578e691a3f (diff)
downloadmeta-openembedded-51c6624684a5acfceb2feeb8bd9bfa7f744c1526.tar.gz
cpprest: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch28
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch28
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb8
3 files changed, 61 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch
new file mode 100644
index 0000000000..dc6b9dfcab
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch
@@ -0,0 +1,28 @@
1From 0c07931f77aa9df2da065b633ae66faad5a570ec Mon Sep 17 00:00:00 2001
2From: Wu Yongwei <wuyongwei@gmail.com>
3Date: Tue, 10 Apr 2018 11:29:12 +0800
4Subject: [PATCH] Fix a build problem on Clang.
5
6AND_CAPTURE_MEMBER_FUNCTION_POINTERS workaround had a check for GCC,
7but did not exclude Clang. Clang has a fake GCC version of 4.2, thus
8caused problems.
9
10Upstream-Status: Backport [https://github.com/Microsoft/cpprestsdk/pull/732]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 Release/src/http/client/http_client_asio.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/Release/src/http/client/http_client_asio.cpp b/Release/src/http/client/http_client_asio.cpp
17index 4ba3e085..fca4bb5b 100644
18--- a/Release/src/http/client/http_client_asio.cpp
19+++ b/Release/src/http/client/http_client_asio.cpp
20@@ -47,7 +47,7 @@
21 #include <unordered_set>
22 #include <memory>
23
24-#if defined(__GNUC__)
25+#if defined(__GNUC__) && !defined(__clang__)
26
27 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
28 #define AND_CAPTURE_MEMBER_FUNCTION_POINTERS
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch
new file mode 100644
index 0000000000..34cbe66974
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch
@@ -0,0 +1,28 @@
1From 816d183eb0fe9ab4607cb049b4b792f8df84d5fe Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 22 May 2018 22:17:43 -0700
4Subject: [PATCH] Define virtual destructor
5
6Fixes
7error: destructor called on non-final 'pplx::details::linux_scheduler' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
8 __data_.second().~_Tp();
9
10Upstream-Status: Pending [https://github.com/Microsoft/cpprestsdk/issues/747]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 Release/include/pplx/pplxlinux.h | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/Release/include/pplx/pplxlinux.h b/Release/include/pplx/pplxlinux.h
18index 6aa1ba35..f3f8d70d 100644
19--- a/Release/include/pplx/pplxlinux.h
20+++ b/Release/include/pplx/pplxlinux.h
21@@ -240,6 +240,7 @@ namespace platform
22 {
23 public:
24 _PPLXIMP virtual void schedule( TaskProc_t proc, _In_ void* param);
25+ virtual ~linux_scheduler() {}
26 };
27
28 } // namespace details
diff --git a/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb b/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
index 2ba6fc66cc..1dbe093bee 100644
--- a/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
+++ b/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
@@ -5,9 +5,11 @@ LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f" 5LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f"
6DEPENDS = "openssl websocketpp zlib boost" 6DEPENDS = "openssl websocketpp zlib boost"
7 7
8SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master" 8SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \
9 9 file://fix-cmake-install.patch \
10SRC_URI += "file://fix-cmake-install.patch" 10 file://0001-Fix-a-build-problem-on-Clang.patch;patchdir=.. \
11 file://0002-Define-virtual-destructor.patch;patchdir=.. \
12 "
11 13
12# tag 2.10.2 14# tag 2.10.2
13SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf" 15SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf"