fix test of some build options
cover fix test of some build options
When using the "make" system which allows a huge number of build combinations, some options were not tested with the script test-build.sh.
Thomas Monjalon (4):
mk: fix build of shared library with libbsd
devtools: add libelf dependency to build test
devtools: test build of zlib PMD
devtools: fix test of some build options
devtools/test-build.sh | 12 +++++++++--- mk/exec-env/linuxapp/rte.vars.mk | 6 ++++++ mk/rte.app.mk | 3 --- mk/rte.lib.mk | 2 ++ 4 files changed, 17 insertions(+), 6 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/4 mk: fix build of shared library with libbsd
When building DPDK with "make" and options
CONFIG_RTE_USE_LIBBSD=y
and
CONFIG_RTE_BUILD_SHARED_LIB=y
libbsd was not linked, resulting in compilation errors:
undefined reference to `strlcpy'
The link option -lbsd is added in a common place for both Linux apps and libs.
It is used in app linkage via EXECENV_LDLIBS,
and in lib linkage via the added variable EXECENV_LDLIBS-y.
--- mk/exec-env/linuxapp/rte.vars.mk | 6 ++++++ mk/rte.app.mk | 3 --- mk/rte.lib.mk | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-)
mk/exec-env/linuxapp/rte.vars.mk +6 -0
@@ -24,6 +24,8 @@ ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) EXECENV_LDLIBS += -lgcc_s endif +EXECENV_LDLIBS-$(CONFIG_RTE_USE_LIBBSD) += -lbsd + # force applications to link with gcc/icc instead of using ld LINK_USING_CC := 1
@@ -32,4 +34,8 @@ EXECENV_LDFLAGS += -export-dynamic # Add library to the group to resolve symbols EXECENV_LDLIBS += -ldl +# EXECENV_LDLIBS-y applies to lib.so and app linking +# while EXECENV_LDLIBS applies only to app linking. +EXECENV_LDLIBS += $(EXECENV_LDLIBS-y) + export EXECENV_CFLAGS EXECENV_LDFLAGS EXECENV_ASFLAGS EXECENV_LDLIBS
mk/rte.app.mk +0 -3
@@ -309,9 +309,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrt ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),yy) _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lnuma endif -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_USE_LIBBSD),yy) -_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lbsd -endif _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMBER) += -lm
mk/rte.lib.mk +2 -0
@@ -35,6 +35,8 @@ PREINSTALL = $(SYMLINK-FILES-y) _INSTALL = $(INSTALL-FILES-y) $(RTE_OUTPUT)/lib/$(LIB) _CLEAN = doclean +LDLIBS += $(EXECENV_LDLIBS-y) + .PHONY: all all: install
Signature · 1 line
2.20.1
PATCH 2/4 devtools: add libelf dependency to build test
In reply to Thomas MonjalonThe option CONFIG_RTE_LIBRTE_BPF_ELF was never enabled with test-build.sh.
It is fixed with the environment variable DPDK_DEP_ELF.
--- devtools/test-build.sh | 4 ++++ 1 file changed, 4 insertions(+)
devtools/test-build.sh +4 -0
@@ -9,6 +9,7 @@ default_path=$PATH # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2) # - DPDK_DEP_ARCHIVE # - DPDK_DEP_CFLAGS +# - DPDK_DEP_ELF (y/[n]) # - DPDK_DEP_ISAL (y/[n]) # - DPDK_DEP_JSON (y/[n]) # - DPDK_DEP_LDFLAGS
@@ -96,6 +97,7 @@ reset_env () unset CROSS unset DPDK_DEP_ARCHIVE unset DPDK_DEP_CFLAGS + unset DPDK_DEP_ELF unset DPDK_DEP_ISAL unset DPDK_DEP_JSON unset DPDK_DEP_LDFLAGS
@@ -186,6 +188,8 @@ config () # <directory> <target> <options> sed -ri 's,(MVPP2_PMD=)n,\1y,' $1/.config test -z "$LIBMUSDK_PATH" || \ sed -ri 's,(MVNETA_PMD=)n,\1y,' $1/.config + test "$DPDK_DEP_ELF" != y || \ + sed -ri 's,(BPF_ELF=)n,\1y,' $1/.config test -z "$DPDK_DEP_JSON" || \ sed -ri 's,(TELEMETRY=)n,\1y,' $1/.config build_config_hook $1 $2 $3
Signature · 1 line
2.20.1
PATCH 3/4 devtools: test build of zlib PMD
In reply to Thomas MonjalonThe PMD zlib was not enabled in devtools/test-build.sh. It is fixed by using the environment variable DPDK_DEP_ZLIB.
--- devtools/test-build.sh | 2 ++ 1 file changed, 2 insertions(+)
devtools/test-build.sh +2 -0
@@ -158,6 +158,8 @@ config () # <directory> <target> <options> test "$DPDK_DEP_ZLIB" != y || \ sed -ri 's,(BNX2X_PMD=)n,\1y,' $1/.config test "$DPDK_DEP_ZLIB" != y || \ + sed -ri 's,(PMD_ZLIB=)n,\1y,' $1/.config + test "$DPDK_DEP_ZLIB" != y || \ sed -ri 's,(COMPRESSDEV_TEST=)n,\1y,' $1/.config test "$DPDK_DEP_PCAP" != y || \ sed -ri 's,(PCAP=)n,\1y,' $1/.config
Signature · 1 line
2.20.1
PATCH 4/4 devtools: fix test of some build options
In reply to Thomas MonjalonCONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo.
CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default.
While at it, DPDK_DEP_JSON is now checked for "y", as other DPDK_DEP_* variables, instead of non-empty.
--- devtools/test-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
devtools/test-build.sh +3 -3
@@ -150,7 +150,7 @@ config () # <directory> <target> <options> test "$DPDK_DEP_ARCHIVE" != y || \ sed -ri 's,(RESOURCE_TAR=)n,\1y,' $1/.config test "$DPDK_DEP_ISAL" != y || \ - sed -ri 's,(ISAL_PMD=)n,\1y,' $1/.config + sed -ri 's,(PMD_ISAL=)n,\1y,' $1/.config test "$DPDK_DEP_MLX" != y || \ sed -ri 's,(MLX._PMD=)n,\1y,' $1/.config test "$DPDK_DEP_SZE" != y || \
@@ -180,7 +180,7 @@ config () # <directory> <target> <options> test "$DPDK_DEP_SSL" != y || \ sed -ri 's,(PMD_OPENSSL=)n,\1y,' $1/.config test "$DPDK_DEP_SSL" != y || \ - sed -ri 's,(PMD_QAT=)n,\1y,' $1/.config + sed -ri 's,(QAT_SYM=)n,\1y,' $1/.config test -z "$FLEXRAN_SDK" || \ sed -ri 's,(BBDEV_TURBO_SW=)n,\1y,' $1/.config sed -ri 's,(SCHED_.*=)n,\1y,' $1/.config
@@ -192,7 +192,7 @@ config () # <directory> <target> <options> sed -ri 's,(MVNETA_PMD=)n,\1y,' $1/.config test "$DPDK_DEP_ELF" != y || \ sed -ri 's,(BPF_ELF=)n,\1y,' $1/.config - test -z "$DPDK_DEP_JSON" || \ + test "$DPDK_DEP_JSON" != y || \ sed -ri 's,(TELEMETRY=)n,\1y,' $1/.config build_config_hook $1 $2 $3
Signature · 1 line
2.20.1
Re: [PATCH 4/4] devtools: fix test of some build options
Quoted 17 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, February 12, 2019 11:05 PM
Cc: [email protected]; Daly, Lee <[email protected]>; Trahe, Fiona <[email protected]>; [email protected]
Subject: [PATCH 4/4] devtools: fix test of some build options
CONFIG_RTE_LIBRTE_PMD_ISALwas not tested because of a typo.
CONFIG_RTE_LIBRTE_PMD_QAT_SYMwas not tested since it has been introduced and madeCONFIG_RTE_LIBRTE_PMD_QATenabled by default.While at it,
DPDK_DEP_JSONis now checked for "y", as other DPDK_DEP_* variables, instead of non-empty.
Quoted 7 lines
Fixes 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")Fixes 7a34c2155716 ("compress/qat: add empty driver")Signed-off-by Thomas Monjalon <[email protected]>
Thomas Monjalon
Applied13/02/2019 00:05, Thomas Monjalon:
Quoted 10 lines
When using the "make" system which allows a huge number of build combinations, some options were not tested with the script
test-build.sh.Thomas Monjalon (4):
mk: fix build of shared library with libbsd
devtools: add libelf dependency to build test
devtools: test build of zlib PMD
devtools: fix test of some build options
Applied