From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0EF1143437;
	Tue,  5 Dec 2023 04:53:38 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id EB4A842DB0;
	Tue,  5 Dec 2023 04:53:34 +0100 (CET)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
 by mails.dpdk.org (Postfix) with ESMTP id 7125A402E7;
 Tue,  5 Dec 2023 04:53:34 +0100 (CET)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CB911474;
 Mon,  4 Dec 2023 19:54:20 -0800 (PST)
Received: from net-arm-n1amp-02.shanghai.arm.com
 (net-arm-n1amp-02.shanghai.arm.com [10.169.210.107])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7CED93F5A1;
 Mon,  4 Dec 2023 19:53:31 -0800 (PST)
From: Joyce Kong <joyce.kong@arm.com>
To: thomas@monjalon.net,
	ruifeng.wang@arm.com,
	bruce.richardson@intel.com
Cc: dev@dpdk.org, nd@arm.com, Joyce Kong <joyce.kong@arm.com>, stable@dpdk.org
Subject: [PATCH v4 1/2] config: correct cpu instruction set for cross build
Date: Tue,  5 Dec 2023 03:52:58 +0000
Message-Id: <20231205035259.3516625-2-joyce.kong@arm.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20231205035259.3516625-1-joyce.kong@arm.com>
References: <20230822074743.3243015-1-joyce.kong@arm.com>
 <20231205035259.3516625-1-joyce.kong@arm.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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@dpdk.org

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@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