diff mbox series

[V2] framework/project_dpdk: add compile options when build 32-bit

Message ID 1600640452-24070-1-git-send-email-lihongx.ma@intel.com (mailing list archive)
State Accepted
Headers show
Series [V2] framework/project_dpdk: add compile options when build 32-bit | expand

Commit Message

Ma, LihongX Sept. 20, 2020, 10:20 p.m. UTC
when build the 32-bit app, should add -m32 cflags to build options.

Signed-off-by: LihongX Ma <lihongx.ma@intel.com>
---
 framework/project_dpdk.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Ling, WeiX Sept. 21, 2020, 6:35 a.m. UTC | #1
Tested-by: Ling, Wei <weix.ling@intel.com>

Regards,
Ling Wei

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of LihongX Ma
> Sent: Monday, September 21, 2020 06:21 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V2] framework/project_dpdk: add compile options when
> build 32-bit
Tu, Lijuan Sept. 23, 2020, 9 a.m. UTC | #2
> Subject: [dts] [PATCH V2] framework/project_dpdk: add compile options when
> build 32-bit
> 
> when build the 32-bit app, should add -m32 cflags to build options.
> 
> Signed-off-by: LihongX Ma <lihongx.ma@intel.com>

Applied
diff mbox series

Patch

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index c1b5eaf..dcf869e 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -254,7 +254,11 @@  class DPDKdut(Dut):
         if len(params) == 0:
             return ''
         else:
-            args = '-Dc_args=' + '\'%s\'' % ' '.join(params)
+            # if will compile 32bit app, should add the parameter of -m32
+            if 'i686' in self.target:
+                args = '-Dc_args=' + '\'-m32 %s\'' % ' '.join(params)
+            else:
+                args = '-Dc_args=' + '\'%s\'' % ' '.join(params)
             return args
 
     def build_install_dpdk(self, target, extra_options=''):