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 36BD3A0540; Mon, 30 May 2022 16:11:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2E5640694; Mon, 30 May 2022 16:11:18 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 7C133400D6 for ; Mon, 30 May 2022 16:11:17 +0200 (CEST) Received: from workstation5.fritz.box (ip-062-143-094-109.um16.pools.vodafone-ip.de [62.143.94.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 1097F3F179; Mon, 30 May 2022 14:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1653919877; bh=Mzz+fQWLHJJAC5Q77kBz4M6/OS4fi1C0r33MnXH8FxQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=gr8AM5elDV+rpkMME6k6I3C97wqkgeV9+MzrzyMd/gRlBnIFLXe9weM8mzonKZ+Gf XL8wuOoXkVjdQNZbQucc7li9XUX2lWnd38dDpTRcHK9E0IeAXmoCeX93BlqlqJwYkn O9Yl9FJsfc4q6YhWjRe9CS1EZWGMPJ/Du7K8bd4IP4MGG83qEGbXXzZrp9bYtANANg iW8DoZ5OH+r17TwJO/usHE6AWxa07rxffIhb1cRKtuk1v0ymJDVDh8QmT3mDQBfp0Q a/ygM+LJlI3OfGnQfBM3meCcg6Tj8Wxoo6hyl/fs5mWqUczypIJ05immEa6yp8UW9n r9mz2ESZplHcQ== From: Heinrich Schuchardt To: dev@dpdk.org Cc: Heinrich Schuchardt Subject: [PATCH] Fix RISC-V builds Date: Mon, 30 May 2022 16:11:03 +0200 Message-Id: <20220530141103.42444-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Building on RISC-V results in an error cc: error: ‘-march=native’: ISA string must begin with rv32 or rv64 As GCC does not support -march=native on RISC-V avoid this argument. Signed-off-by: Heinrich Schuchardt --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 507c146..bbf4650 100644 --- a/meson.build +++ b/meson.build @@ -17,7 +17,10 @@ pktgen_conf = configuration_data() # set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') -add_project_arguments('-march=native', language: 'c') +target = target_machine.cpu_family() +if (target != 'riscv64') + add_project_arguments('-march=native', language: 'c') +endif if get_option('enable-avx') and cc.has_argument('-mavx') add_project_arguments('-mavx', language: 'c') -- 2.36.1