Skip to contentSkip to conversation

devtools: skip ABI check in static builds

PATCH In review Thomas Monjalon 3 participants 5 messages Apr 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: skip ABI check in static builds

When running make with CONFIG_RTE_BUILD_SHARED_LIB=n, no shared library is built.
In this case, no need to run ABI check.

With meson, both shared and static libraries are always built.

---
 devtools/test-build.sh | 1 +
 1 file changed, 1 insertion(+)
devtools/test-build.sh +1 -0
index a298115002..6e53f86fc8 100755
@@ -262,6 +262,7 @@ for conf in $configs ; do
 		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
 		O=$(readlink -f $dir)/examples
 	unset RTE_TARGET
+	grep -q 'SHARED_LIB=n' $dir/.config || # skip ABI check with static libs
 	if [ -n "$DPDK_ABI_REF_VERSION" ]; then
 		abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
 		if [ ! -d $abirefdir/$conf ]; then
Signature · 1 line
2.26.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Monjalon

When running make with CONFIG_RTE_BUILD_SHARED_LIB=n, no shared library is built.
In this case, no need to run ABI check.

With meson, both shared and static libraries are always built.

You can easily do the same thing for meson, by checking the 3rd parameter to build() in test-meson-build.sh,

Quoted 11 lines
---
 devtools/test-build.sh | 1 +
 1 file changed, 1 insertion(+)
devtools/test-build.sh +0 -0
index a298115002..6e53f86fc8 100755

devtools/test-build.sh for conf in $configs ; do · line 268

Quoted 7 lines
devtools/test-build.sh +1 -0
@@ -262,6 +262,7 @@ for conf in $configs ; do
 		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
 		O=$(readlink -f $dir)/examples
 	unset RTE_TARGET
+	grep -q 'SHARED_LIB=n' $dir/.config || # skip ABI check with static libs
 	if [ -n "$DPDK_ABI_REF_VERSION" ]; then
 		abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
 		if [ ! -d $abirefdir/$conf ]; then
#2 lore raw

21/04/2020 08:11, Ray Kinsella:

Quoted 9 lines · Thomas Monjalon
Quoted 5 lines

When running make with CONFIG_RTE_BUILD_SHARED_LIB=n, no shared library is built.
In this case, no need to run ABI check.

With meson, both shared and static libraries are always built.

You can easily do the same thing for meson, by checking the 3rd parameter to build() in test-meson-build.sh,

No, both library types are always compiled.
The only option is to choose which library to link in built-in apps.

author Reviewed-by Ray Kinsella Applied
#4 lore raw

21/04/2020 10:02, David Marchand:

Quoted 11 lines · Thomas Monjalon
Quoted 8 lines

When running make with CONFIG_RTE_BUILD_SHARED_LIB=n, no shared library is built.
In this case, no need to run ABI check.

With meson, both shared and static libraries are always built.

Applied