procmail: Use build ldflags when invoking native compile/link
PATCH 1/3 procmail: Use build ldflags when invoking native compile/link
Some older compilers do not support security flags like -fstack-protector=strong and if we do not set this then it will use the target flags to pass here which will fail with gcc < 5.x, especially a problem building distros with security flags on host with 4.x gcc e.g. ubuntu 14.04
Signed-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-support/procmail/procmail_3.22.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/procmail/procmail_3.22.bb +1 -1
@@ -29,7 +29,7 @@ do_configure() { export CFLAGS="${BUILD_CFLAGS}" export AR="${BUILD_AR}" export AS="${BUILD_AS}" - make TARGET_CFLAGS="$TARGET_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" autoconf.h + make TARGET_CFLAGS="$TARGET_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${BUILD_LDFLAGS}" autoconf.h } do_compile() {
Signature · 1 line
2.17.0
PATCH 2/3 cpprest: Fix build with clang
Signed-off-by Khem Raj <[email protected]>
--- .../0001-Fix-a-build-problem-on-Clang.patch | 28 +++++++++++++++++++ .../0002-Define-virtual-destructor.patch | 28 +++++++++++++++++++ .../recipes-support/cpprest/cpprest_2.10.2.bb | 8 ++++-- 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch create mode 100644 meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch
meta-oe/recipes-support/cpprest/cpprest-2.10.2/0001-Fix-a-build-problem-on-Clang.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 0c07931f77aa9df2da065b633ae66faad5a570ec Mon Sep 17 00:00:00 2001 +From: Wu Yongwei <[email protected]> +Date: Tue, 10 Apr 2018 11:29:12 +0800 +Subject: [PATCH] Fix a build problem on Clang. + +AND_CAPTURE_MEMBER_FUNCTION_POINTERS workaround had a check for GCC, +but did not exclude Clang. Clang has a fake GCC version of 4.2, thus +caused problems. + +Upstream-Status: Backport [https://github.com/Microsoft/cpprestsdk/pull/732] +Signed-off-by: Khem Raj <[email protected]> +--- + Release/src/http/client/http_client_asio.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Release/src/http/client/http_client_asio.cpp b/Release/src/http/client/http_client_asio.cpp +index 4ba3e085..fca4bb5b 100644 +--- a/Release/src/http/client/http_client_asio.cpp ++++ b/Release/src/http/client/http_client_asio.cpp +@@ -47,7 +47,7 @@ + #include <unordered_set> + #include <memory> + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && !defined(__clang__) + + #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + #define AND_CAPTURE_MEMBER_FUNCTION_POINTERS
meta-oe/recipes-support/cpprest/cpprest-2.10.2/0002-Define-virtual-destructor.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 816d183eb0fe9ab4607cb049b4b792f8df84d5fe Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 22 May 2018 22:17:43 -0700 +Subject: [PATCH] Define virtual destructor + +Fixes +error: destructor called on non-final 'pplx::details::linux_scheduler' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] + __data_.second().~_Tp(); + +Upstream-Status: Pending [https://github.com/Microsoft/cpprestsdk/issues/747] + +Signed-off-by: Khem Raj <[email protected]> +--- + Release/include/pplx/pplxlinux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Release/include/pplx/pplxlinux.h b/Release/include/pplx/pplxlinux.h +index 6aa1ba35..f3f8d70d 100644 +--- a/Release/include/pplx/pplxlinux.h ++++ b/Release/include/pplx/pplxlinux.h +@@ -240,6 +240,7 @@ namespace platform + { + public: + _PPLXIMP virtual void schedule( TaskProc_t proc, _In_ void* param); ++ virtual ~linux_scheduler() {} + }; + + } // namespace details
meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb +5 -3
@@ -5,9 +5,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f" DEPENDS = "openssl websocketpp zlib boost" -SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master" - -SRC_URI += "file://fix-cmake-install.patch" +SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \ + file://fix-cmake-install.patch \ + file://0001-Fix-a-build-problem-on-Clang.patch;patchdir=.. \ + file://0002-Define-virtual-destructor.patch;patchdir=.. \ + " # tag 2.10.2 SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf"
Signature · 1 line
2.17.0
PATCH 3/3 libmusicbrainz: Set CMAKE_EXE_LINKER_FLAGS to build linker flags
In reply to Khem RajSome older compilers do not support security flags like -fstack-protector=strong and if we do not set this then it will use the target flags to pass here which will fail with gcc < 5.x, especially a problem building distros with security flags on host with 4.x gcc e.g. ubuntu 14.04
Signed-off-by Khem Raj <[email protected]>
--- .../recipes-multimedia/musicbrainz/libmusicbrainz_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb +3 -1
@@ -22,10 +22,12 @@ do_configure_prepend() { git clean -dfx -e /.pc/ -e /patches/ . mkdir build-native cd build-native - cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \ + LDFLAGS="${BUILD_LDFLAGS}" \ + cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \ -DCMAKE_C_COMPILER=${BUILD_CC} \ -DCMAKE_CXX_FLAGS=${BUILD_CXXFLAGS} \ -DCMAKE_CXX_COMPILER=${BUILD_CXX} \ + -DCMAKE_EXE_LINKER_FLAGS=${BUILD_LDFLAGS} \ .. make make-c-interface cd ..
Signature · 1 line
2.17.0