* [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
* Re: [PATCH] Fix RISC-V builds
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
0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2022-06-08 7:23 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: dev, Stanislaw Kardach
Hello,
On Mon, May 30, 2022 at 4:11 PM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> 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>
I am finalizing the RISC-V merge for -rc1, this fix can be merged
later as we only have cross compilation in GHA with the initial
series.
> ---
> 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
Would the below snippet work?
cc.has_argument('-march=native'')
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
>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix RISC-V builds
2022-06-08 7:23 ` David Marchand
@ 2022-06-08 9:56 ` Heinrich Schuchardt
2022-06-08 10:01 ` David Marchand
0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2022-06-08 9:56 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Stanislaw Kardach, Keith Wiles
On 6/8/22 09:23, David Marchand wrote:
> Hello,
>
> On Mon, May 30, 2022 at 4:11 PM Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> 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>
>
> I am finalizing the RISC-V merge for -rc1, this fix can be merged
> later as we only have cross compilation in GHA with the initial
> series.
Keith Wiles <keith.wiles@intel.com> already merged this patch into
PktGen-DPDK.
@Keith
Maybe CONTRIBUTING.txt in that package should suggest a title prefix for
PktGen patches to avoid future confusion.
Best regards
Heinrich
>
>
>> ---
>> 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
>
> Would the below snippet work?
>
> cc.has_argument('-march=native'')
> 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
* Re: [PATCH] Fix RISC-V builds
2022-06-08 9:56 ` Heinrich Schuchardt
@ 2022-06-08 10:01 ` David Marchand
2022-06-08 11:13 ` Heinrich Schuchardt
0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2022-06-08 10:01 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: dev, Stanislaw Kardach, Keith Wiles, Thomas Monjalon
On Wed, Jun 8, 2022 at 11:56 AM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> On 6/8/22 09:23, David Marchand wrote:
> > Hello,
> >
> > On Mon, May 30, 2022 at 4:11 PM Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> >>
> >> 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>
> >
> > I am finalizing the RISC-V merge for -rc1, this fix can be merged
> > later as we only have cross compilation in GHA with the initial
> > series.
>
> Keith Wiles <keith.wiles@intel.com> already merged this patch into
> PktGen-DPDK.
It was hard to tell, from just this mail...
>
> @Keith
> Maybe CONTRIBUTING.txt in that package should suggest a title prefix for
> PktGen patches to avoid future confusion.
Yes, and I marked the patch as Not applicable in patchwork.
--
David Marchand
^ 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).