summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2021-02-09 00:54:15 -0800
committerKhem Raj <raj.khem@gmail.com>2021-02-09 08:51:48 -0800
commit5506dc7ddbb6ed9427f160642400f40ab854d0f3 (patch)
tree69b99f0eb38fc8741487ebb1cbab68aed3d5d0e4 /meta-networking
parentc5acdbe0939981aa6a4919620aab93ac2b2e14af (diff)
downloadmeta-openembedded-5506dc7ddbb6ed9427f160642400f40ab854d0f3.tar.gz
ndpi: fix autoconf-2.71 compatibility
While DEBUG_BUILD != 1, Yocto adds option _FORTIFY_SOURCE to CPP and CC [1], since _FORTIFY_SOURCE requires -O1 or higher, if no -O1 or higher then results in a compiler warning. The configure.ac of ndpi uses macro AC_PROG_CC to test toolchain, since CPPFLAGS does not have the option -O<level> [1], while building with autoconf 2.71+, the toolchain test will report a warning. The configure.ac of ndpi uses macro AC_LANG_WERROR to treat the warning as error. Then it broke the build ... |configure: error: C preprocessor "i686-wrs-linux-gcc -E --sysroot=tmp-glibc/ work/core2-32-wrs-linux/ndpi/3.4-r0/recipe-sysroot -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security" fails sanity check ... The SELECTED_OPTIMIZATION contains option -O<level>, add SELECTED_OPTIMIZATION to CPPFLAGS to could fix the issue [1] The definition of CPP and CC and XXXFLAGS in bitbake.conf [snip] export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" ... export CFLAGS = "${TARGET_CFLAGS}" TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}" ... export CPPFLAGS = "${TARGET_CPPFLAGS}" TARGET_CPPFLAGS = "" [snip] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/ntopng/ndpi_3.4.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntopng/ndpi_3.4.bb b/meta-networking/recipes-support/ntopng/ndpi_3.4.bb
index 1e4153779..22e4d8e9a 100644
--- a/meta-networking/recipes-support/ntopng/ndpi_3.4.bb
+++ b/meta-networking/recipes-support/ntopng/ndpi_3.4.bb
@@ -17,6 +17,8 @@ S = "${WORKDIR}/git"
17 17
18inherit autotools-brokensep pkgconfig 18inherit autotools-brokensep pkgconfig
19 19
20CPPFLAGS += "${SELECTED_OPTIMIZATION}"
21
20do_configure_prepend() { 22do_configure_prepend() {
21 ${S}/autogen.sh 23 ${S}/autogen.sh
22} 24}