From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C293845902; Wed, 4 Sep 2024 15:59:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 847994025A; Wed, 4 Sep 2024 15:59:50 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id 72FB04014F for ; Wed, 4 Sep 2024 15:59:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725458389; x=1756994389; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2kt/4Fz0ZxjR4pPz/vDDj0q4rCqOy1XTJEvqFsAE85M=; b=id27+xQn42w2haEyGAWeDoWerel0EyBxFI5Yg3O8UL0C8eLKHMMFO6AM 94Ndf4mYCZIn71VElc5YxTLUgLeGaZ54fj1M6VjAXNsPuYciJkfq4ueFS Up4VbAoNlpgx67ZQKMsBpD1Lc9Q3PhPT14qaJ+96eTWuHyLvlU+dvzYwL QtwZqM0I0UvhKcDXl202LaSeR0UmCwlVfsiRntkKl//cLRLahGGihHr9e YS4RrVi95nQ6O0ZznObC8rWlPhUIzEpYNQ1LdViCpHlC7agVo6CKQJKHN fvvP5+mYJj7i+/65iQ9seh1rVrvDhduAlfaNNURkQ0XX7lwcVHpsZP6+Z Q==; X-CSE-ConnectionGUID: /H4OJwYoTueZANqJ5g3Smg== X-CSE-MsgGUID: RIRrBbxhRm+IQTbvz8w5gw== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="24261824" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="24261824" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 06:59:47 -0700 X-CSE-ConnectionGUID: DoZttmgmSku7Y+XBaQRgWA== X-CSE-MsgGUID: 4hhFWAo6SY6LVZfv+JdIvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="65118272" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by orviesa010.jf.intel.com with ESMTP; 04 Sep 2024 06:59:47 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH] config: add 32-bit cross-compilation x86 target Date: Wed, 4 Sep 2024 14:57:00 +0100 Message-ID: <20240904135939.329324-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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