DPDK patches and discussions
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Stanislaw Kardach <kda@semihalf.com>,
	Keith Wiles <keith.wiles@intel.com>
Subject: Re: [PATCH] Fix RISC-V builds
Date: Wed, 8 Jun 2022 11:56:28 +0200	[thread overview]
Message-ID: <272b30ec-1fa9-7d03-762f-55e18f178fd0@canonical.com> (raw)
In-Reply-To: <CAJFAV8wW5way11C5RA6pt3jDVrsVoy+0HCU3q5jgkJWGVdzTgQ@mail.gmail.com>

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
>>
> 
> 


  reply	other threads:[~2022-06-08  9:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 14:11 Heinrich Schuchardt
2022-06-08  7:23 ` David Marchand
2022-06-08  9:56   ` Heinrich Schuchardt [this message]
2022-06-08 10:01     ` David Marchand
2022-06-08 11:13       ` Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=272b30ec-1fa9-7d03-762f-55e18f178fd0@canonical.com \
    --to=heinrich.schuchardt@canonical.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=kda@semihalf.com \
    --cc=keith.wiles@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).