DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] config: add 32-bit cross-compilation x86 target
@ 2024-09-04 13:57 Bruce Richardson
  2024-09-06 15:34 ` Medvedkin, Vladimir
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
  0 siblings, 2 replies; 18+ messages in thread
From: Bruce Richardson @ 2024-09-04 13:57 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

To simplify building 32-bit binaries on 64-bit system, we can supply a
cross-compilation file which provides the relevant compiler flags and
settings needed - '-m32' compile/link flag, and appropriate
PKG_CONFIG_LIBDIR value. This latter setting will depend upon the layout
format of the particular OS/distro in use, so initially add a cross file
with paths set for Debian or Ubuntu systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

The generation of 32-bit cross-files for other distros is left as an
exercise for the reader! I suspect that for Fedora/RHEL and Arch
variants that only the "pkg_config_libdir" and "libdir" setting should
be adjusted. However, I don't currently have a machine set up to test
that assumption, so getting the ball rolling for now with just this
patch to get feedback.

---

 config/x86/cross-debian-32bit | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 config/x86/cross-debian-32bit

diff --git a/config/x86/cross-debian-32bit b/config/x86/cross-debian-32bit
new file mode 100644
index 0000000000..2f6e4714cb
--- /dev/null
+++ b/config/x86/cross-debian-32bit
@@ -0,0 +1,22 @@
+[binaries]
+c = 'cc'
+cpp = 'c++'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'native'
+endian = 'little'
+
+[properties]
+pkg_config_libdir = '/usr/lib/i386-linux-gnu/pkgconfig'
+
+[built-in options]
+c_args = '-m32'
+c_link_args = '-m32'
+cpp_args = '-m32'
+cpp_link_args = '-m32'
+libdir = 'lib/i386-linux-gnu'
-- 
2.43.0


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

end of thread, other threads:[~2024-10-17  7:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-04 13:57 [PATCH] config: add 32-bit cross-compilation x86 target Bruce Richardson
2024-09-06 15:34 ` Medvedkin, Vladimir
2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 2/4] config: add fedora 32-bit x86 cross-compile file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 3/4] config: add arch 32-bit cross-compilation file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 4/4] devtools/test-meson-builds: use cross files for 32bit build Bruce Richardson
2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
2024-09-19  7:52     ` Bruce Richardson
2024-09-19  8:02     ` Bruce Richardson
2024-09-19  8:08       ` David Marchand
2024-09-19 11:15         ` Bruce Richardson
2024-09-19 11:32           ` David Marchand
2024-09-19 12:09             ` Robin Jarry
2024-09-19 12:57               ` Bruce Richardson
2024-10-08  8:38       ` David Marchand
2024-10-08  9:05         ` Bruce Richardson
2024-10-17  7:58   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).