[PATCH v4 1/2] config: correct cpu instruction set for cross build

Joyce Kong joyce.kong at arm.com
Tue Dec 5 04:52:58 CET 2023


The platform value would be 'native' only when not cross build.
Move the operation about modifying cpu_instruction_set while
platform equals 'native' to the not cross build branch.

Fixes: bf66003b51ec ("build: use platform for generic and native builds")
Cc: stable at dpdk.org

Signed-off-by: Joyce Kong <joyce.kong at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 config/meson.build | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index a9ccd56deb..0f37bc733c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -121,13 +121,14 @@ else
             cpu_instruction_set = 'generic'
         endif
     endif
+    if platform == 'native'
+        if cpu_instruction_set == 'auto'
+            cpu_instruction_set = 'native'
+        endif
+    endif
 endif
 
-if platform == 'native'
-    if cpu_instruction_set == 'auto'
-        cpu_instruction_set = 'native'
-    endif
-elif platform == 'generic'
+if platform == 'generic'
     if cpu_instruction_set == 'auto'
         cpu_instruction_set = 'generic'
     endif
-- 
2.25.1



More information about the stable mailing list