diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-06 20:49:52 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-07 16:44:54 -0700 |
commit | 5b73deaf184f1bd4b78158552c144042a11d1d20 (patch) | |
tree | 6f2a025f2a344cab1059058b2e8668752c47cf2a | |
parent | 62db1c041f8149f93f109da1102fbabbdff5094f (diff) | |
download | meta-openembedded-5b73deaf184f1bd4b78158552c144042a11d1d20.tar.gz |
minifi-cpp: Disable lto.
lto does not work always. Its enabled only in civetweb and no where
else. Fow cosnsitent builds disable it everywhere.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-Disable-lto.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | 8 |
2 files changed, 39 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-Disable-lto.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-Disable-lto.patch new file mode 100644 index 0000000000..ec4e6ffc45 --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-Disable-lto.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 120c708d51f72ade4a31d3d8f35bcfad7b12e723 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 6 Sep 2022 20:38:03 -0700 | ||
4 | Subject: [PATCH] civetweb: Disable lto | ||
5 | |||
6 | lto does not work everywhere, therefore disable it atleast in the cmake | ||
7 | file, we can still enable it via environment | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | thirdparty/civetweb-1.10/CMakeLists.txt | 4 ---- | ||
14 | 1 file changed, 4 deletions(-) | ||
15 | |||
16 | --- a/thirdparty/civetweb-1.10/CMakeLists.txt | ||
17 | +++ b/thirdparty/civetweb-1.10/CMakeLists.txt | ||
18 | @@ -298,7 +298,6 @@ add_c_compiler_flag(/WX) | ||
19 | add_c_compiler_flag(-pedantic-errors) | ||
20 | add_c_compiler_flag(-fvisibility=hidden) | ||
21 | add_c_compiler_flag(-fstack-protector-strong RELEASE) | ||
22 | -add_c_compiler_flag(-flto RELEASE) | ||
23 | |||
24 | add_c_compiler_flag(-fstack-protector-all DEBUG) | ||
25 | if (MINGW) | ||
26 | @@ -361,7 +360,6 @@ if (CIVETWEB_ENABLE_CXX) | ||
27 | add_cxx_compiler_flag(-pedantic-errors) | ||
28 | add_cxx_compiler_flag(-fvisibility=hidden) | ||
29 | add_cxx_compiler_flag(-fstack-protector-strong RELEASE) | ||
30 | - add_cxx_compiler_flag(-flto RELEASE) | ||
31 | |||
32 | add_cxx_compiler_flag(-fstack-protector-all DEBUG) | ||
33 | if (MINGW) | ||
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb index 8fc253908f..3b57ceace6 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | |||
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht | |||
30 | file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \ | 30 | file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \ |
31 | file://0001-cxxopts-Add-limits-header.patch \ | 31 | file://0001-cxxopts-Add-limits-header.patch \ |
32 | file://0001-Fix-build-with-libc.patch \ | 32 | file://0001-Fix-build-with-libc.patch \ |
33 | file://0001-civetweb-Disable-lto.patch \ | ||
33 | file://minifi.service \ | 34 | file://minifi.service \ |
34 | file://systemd-volatile.conf \ | 35 | file://systemd-volatile.conf \ |
35 | file://sysvinit-volatile.conf \ | 36 | file://sysvinit-volatile.conf \ |
@@ -80,10 +81,13 @@ do_install[cleandirs] += "${WORKDIR}/minifi-install" | |||
80 | PSEUDO_CONSIDER_PATHS .= ",${WORKDIR}/minifi-install" | 81 | PSEUDO_CONSIDER_PATHS .= ",${WORKDIR}/minifi-install" |
81 | 82 | ||
82 | do_configure:prepend:libc-musl() { | 83 | do_configure:prepend:libc-musl() { |
83 | sed -i -e 's/-DHAVE_GLIBC_STRERROR_R=1/-DHAVE_GLIBC_STRERROR_R=0/' ${S}/CMakeLists.txt | 84 | sed -i -e 's/-DHAVE_GLIBC_STRERROR_R=?/-DHAVE_GLIBC_STRERROR_R=0/' ${S}/CMakeLists.txt |
84 | sed -i -e 's/-DHAVE_POSIX_STRERROR_R=0/-DHAVE_POSIX_STRERROR_R=1/' ${S}/CMakeLists.txt | 85 | sed -i -e 's/-DHAVE_POSIX_STRERROR_R=?/-DHAVE_POSIX_STRERROR_R=1/' ${S}/CMakeLists.txt |
85 | } | 86 | } |
86 | 87 | ||
88 | CFLAGS:append:libc-glibc = " -D_GNU_SOURCE" | ||
89 | CXXFLAGS:append:libc-glibc = " -D_GNU_SOURCE" | ||
90 | |||
87 | do_install() { | 91 | do_install() { |
88 | DESTDIR='${WORKDIR}/minifi-install' cmake_runcmake_build --target ${OECMAKE_TARGET_INSTALL} | 92 | DESTDIR='${WORKDIR}/minifi-install' cmake_runcmake_build --target ${OECMAKE_TARGET_INSTALL} |
89 | MINIFI_BIN=${bindir} | 93 | MINIFI_BIN=${bindir} |