DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test-meson-builds: add a 32-bit build
@ 2020-11-05 11:07 Bruce Richardson
  2020-11-05 11:13 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Bruce Richardson @ 2020-11-05 11:07 UTC (permalink / raw)
  To: dev; +Cc: thomas, Bruce Richardson

It's reasonably common for patches to have issues when built on 32-bits, so
to prevent this, we can add a 32-bit build (if supported) to the
"test-meson-builds.sh" script. The tricky bit is using a valid
PKG_CONFIG_LIBDIR, so for now we use two common possibilities for where that
should point to in order to get a successful build.

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

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a87de635a..02db73e98 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -226,6 +226,19 @@ for f in $srcdir/config/ppc/ppc* ; do
 	build build-$(basename $f | cut -d'-' -f-2) $f $use_shared
 done
 
+# test a 32-bit build
+if echo "int main(void) { return 0; }" | cc -m32 -x c - -o /dev/null 2> /dev/null ; then
+	if [ -d "/usr/lib/i386-linux-gnu" ] ; then
+		# 32-bit pkgconfig on debian/ubuntu
+		export PKG_CONFIG_LIBDIR="/usr/lib/i386-linux-gnu/pkgconfig"
+	else
+		# 32-bit pkgconfig on RHEL/fedora (lib vs lib64)
+		export PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
+	fi
+	build build-32-bit cc -Dc_args='-m32' -Dc_link_args='-m32'
+	unset PKG_CONFIG_LIBDIR
+fi
+
 # Test installation of the x86-default target, to be used for checking
 # the sample apps build using the pkg-config file for cflags and libs
 build_path=$(readlink -f $builds_dir/build-x86-default)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-11-06 17:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 11:07 [dpdk-dev] [PATCH] test-meson-builds: add a 32-bit build Bruce Richardson
2020-11-05 11:13 ` Thomas Monjalon
2020-11-05 11:21   ` Bruce Richardson
2020-11-05 12:56     ` Thomas Monjalon
2020-11-05 17:19   ` Bruce Richardson
2020-11-05 17:21 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2020-11-06 12:40   ` Thomas Monjalon
2020-11-06 14:08     ` Bruce Richardson
2020-11-06 16:56 ` [dpdk-dev] [PATCH v3 1/1] devtools: test " Thomas Monjalon
2020-11-06 17:01   ` Bruce Richardson
2020-11-06 17:11     ` Thomas Monjalon
2020-11-06 17:30       ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git