devtools: skip ABI check in static builds

Message ID 20200421013329.287556-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: skip ABI check in static builds |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/iol-testing fail Testing issues

Commit Message

Thomas Monjalon April 21, 2020, 1:33 a.m. UTC
  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.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-build.sh | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ray Kinsella April 21, 2020, 6:11 a.m. UTC | #1
On 21/04/2020 02:33, Thomas Monjalon wrote:
> 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, 

> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/test-build.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/devtools/test-build.sh b/devtools/test-build.sh
> index a298115002..6e53f86fc8 100755
> --- a/devtools/test-build.sh
> +++ b/devtools/test-build.sh
> @@ -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
> 
Reviewed-by: Ray Kinsella <mdr@ashroe.eu>
  
David Marchand April 21, 2020, 8:02 a.m. UTC | #2
On Tue, Apr 21, 2020 at 3:33 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: David Marchand <david.marchand@redhat.com>
  
Thomas Monjalon April 21, 2020, 9:15 a.m. UTC | #3
21/04/2020 08:11, Ray Kinsella:
> 
> On 21/04/2020 02:33, Thomas Monjalon wrote:
> > 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.
  
Thomas Monjalon April 21, 2020, 9:20 a.m. UTC | #4
21/04/2020 10:02, David Marchand:
> On Tue, Apr 21, 2020 at 3:33 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: David Marchand <david.marchand@redhat.com>

Reviewed-by: Ray Kinsella <mdr@ashroe.eu>

Applied
  

Patch

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index a298115002..6e53f86fc8 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -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