mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-17 20:51:57 +02:00
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>
29 lines
717 B
BlitzBasic
29 lines
717 B
BlitzBasic
SUMMARY = "A library for deep-packet inspection."
|
|
DESCRIPTION = "nDPI is an open source LGPLv3 library for deep-packet \
|
|
inspection. Based on OpenDPI it includes ntop extensions"
|
|
|
|
SECTION = "libdevel"
|
|
DEPENDS = "libpcap"
|
|
RDEPENDS_${PN} += " libpcap"
|
|
LICENSE = "GPLv3"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b52f2d57d10c4f7ee67a7eb9615d5d24"
|
|
|
|
SRCREV = "64929a75e0a7a60d864bd25a9fd97fdf9ac892a2"
|
|
SRC_URI = "git://github.com/ntop/nDPI.git;branch=3.4-stable \
|
|
file://0001-autogen.sh-not-generate-configure.patch \
|
|
"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
inherit autotools-brokensep pkgconfig
|
|
|
|
CPPFLAGS += "${SELECTED_OPTIMIZATION}"
|
|
|
|
do_configure_prepend() {
|
|
${S}/autogen.sh
|
|
}
|
|
|
|
EXTRA_OEMAKE = " \
|
|
libdir=${libdir} \
|
|
"
|