[v2,4/4] devtools/test-meson-builds: use cross files for 32bit build

Message ID 20240906161244.1663967-5-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: David Marchand
Headers
Series simplify doing 32-bit DPDK builds |

Checks

Context Check Description
ci/loongarch-compilation success Compilation OK
ci/checkpatch warning coding style issues
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Bruce Richardson Sept. 6, 2024, 4:12 p.m. UTC
When testing the 32-bit x86 build, use a cross-file rather than using
args and pkgconfig environment variable. The advantage of using the
cross-file is that the paths are saved across runs. Without this patch,
while the '-m32' args settings are preserved between meson runs, the
PKG_CONFIG_LIBDIR value from environment is not, which can cause
rebuilds of the build-32b directory to fail if meson needs to do
a reconfiguration first.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
  

Patch

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index d71bb1ded0..4fff1f7177 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -253,21 +253,18 @@  build build-x86-generic cc skipABI -Dcheck_includes=true \
 
 # 32-bit with default compiler
 if check_cc_flags '-m32' ; then
+	target_override='i386-pc-linux-gnu'
 	if [ -d '/usr/lib/i386-linux-gnu' ] ; then
-		# 32-bit pkgconfig on Debian/Ubuntu
-		export PKG_CONFIG_LIBDIR='/usr/lib/i386-linux-gnu/pkgconfig'
+		# 32-bit pkgconfig on Debian/Ubuntu, use cross file
+		build build-32b $srcdir/config/x86/cross-32bit-debian.ini ABI
 	elif [ -d '/usr/lib32' ] ; then
 		# 32-bit pkgconfig on Arch
-		export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig'
+		build build-32b $srcdir/config/x86/cross-32bit-arch.ini ABI
 	else
 		# 32-bit pkgconfig on RHEL/Fedora (lib vs lib64)
-		export PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig'
+		build build-32b $srcdir/config/x86/cross-32bit-fedora.ini ABI
 	fi
-	target_override='i386-pc-linux-gnu'
-	build build-32b cc ABI -Dc_args='-m32' -Dc_link_args='-m32' \
-			-Dcpp_args='-m32' -Dcpp_link_args='-m32'
 	target_override=
-	unset PKG_CONFIG_LIBDIR
 fi
 
 # x86 MinGW