DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] Fix RISC-V builds
@ 2022-05-30 14:11 Heinrich Schuchardt
  2022-06-08  7:23 ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2022-05-30 14:11 UTC (permalink / raw)
  To: dev; +Cc: Heinrich Schuchardt

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 <heinrich.schuchardt@canonical.com>
---
 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-08 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 14:11 [PATCH] Fix RISC-V builds Heinrich Schuchardt
2022-06-08  7:23 ` David Marchand
2022-06-08  9:56   ` Heinrich Schuchardt
2022-06-08 10:01     ` David Marchand
2022-06-08 11:13       ` Heinrich Schuchardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).