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 E8BFEA00C3; Wed, 8 Jun 2022 11:56:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AC1E4069C; Wed, 8 Jun 2022 11:56:32 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id C23714021D for ; Wed, 8 Jun 2022 11:56:30 +0200 (CEST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (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-internal-0.canonical.com (Postfix) with ESMTPS id 900993F1B6 for ; Wed, 8 Jun 2022 09:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654682190; bh=nfRDq1be9xBC+pUKz/j+MIKfFAinpyzE/+TfM0wiH4c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BIPr5qfDU5Rq1qdhUL8LW2kmIEAb0U+1LlfMI1Z7ggy6/YQFMSmHchqyxe03jd5rA hcWmM2nnyucNa0YP9wlXQFCzVDkLaD3N/SIKvtWob7Au5tdhh/3v7iycpeRj8B0sRH XtTkpTJjhJhHKDiC6to29R7IPzlGxV5G9x66rgYQcrmgppPkfQ+h9bmiBMH1Z26HNZ JybiapzjqBXExK8/CTlZzsqdq8I008TOK89w5TrTzWQjmF5ptAh+Y+AFK6vzMZpL8A N2IYHwBwWySiTte4yUwGiTDSsK+EKgfTJsE4s7Ms6mQULKMKPcke4GQ0xULyf8+GUX q+E5kqtk7lK3A== Received: by mail-wr1-f69.google.com with SMTP id e9-20020a5d5949000000b00216ffb6df18so2876994wri.14 for ; Wed, 08 Jun 2022 02:56:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=nfRDq1be9xBC+pUKz/j+MIKfFAinpyzE/+TfM0wiH4c=; b=VwuT7XcohHoe0E/i5vPDojpkfn+gTh+3W6n6DvNTwvF9/MsY+Rd1L25tjzDGj3iXg0 JPsZlAft2HOkI8Lymv7+7YZWa1AtzCTq2/uv55j9KTatCvjFVT5Fk9HkR8QyY179Kf0Z kmm+hUvL3acsV3LXcHoIHGF1QpFCojQDnNCyXpu3OD4kgaTu0dUI36OsBu0bKR4Bo8/c jLmwCYJh9vMHWv3udPVouLYY1+6LCfYETeC+etxlnY+G8vZ5qSPb1tcfMGCE0T6omz4H ZSPrzR9YXJfNr93ri2egyuVjJDvHWWCAzP7WsVofv/9IX5z+ntNUO9LrSl2BNKlQieO8 ET9Q== X-Gm-Message-State: AOAM5319kle3UXdbrq+IN/lPVpWzLMlhzHylicu/26ahutK3KMU7Dauq OY34u8PmcM3KxMyHV4FYtDaPsKckr2eGRKnOUx9urcDqW0ce31daHBzQpqh4ALH3yb8yt8pe27C COvIPjrqWQhY1doehAsfM X-Received: by 2002:adf:f782:0:b0:214:7c48:6fab with SMTP id q2-20020adff782000000b002147c486fabmr26151290wrp.98.1654682190218; Wed, 08 Jun 2022 02:56:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeKh8yzf98gtjOSWQ6/zo1yJAJHk7R0As4Vm9xDXBiUobvVNc/Q902wRQ+8hKyiXMO7hn0qw== X-Received: by 2002:adf:f782:0:b0:214:7c48:6fab with SMTP id q2-20020adff782000000b002147c486fabmr26151273wrp.98.1654682189987; Wed, 08 Jun 2022 02:56:29 -0700 (PDT) Received: from [192.168.123.67] (ip-062-143-094-109.um16.pools.vodafone-ip.de. [62.143.94.109]) by smtp.gmail.com with ESMTPSA id h12-20020a05600c2cac00b0039749256d74sm28309767wmc.2.2022.06.08.02.56.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 02:56:29 -0700 (PDT) Message-ID: <272b30ec-1fa9-7d03-762f-55e18f178fd0@canonical.com> Date: Wed, 8 Jun 2022 11:56:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] Fix RISC-V builds Content-Language: en-US To: David Marchand Cc: dev , Stanislaw Kardach , Keith Wiles References: <20220530141103.42444-1-heinrich.schuchardt@canonical.com> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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 On 6/8/22 09:23, David Marchand wrote: > Hello, > > On Mon, May 30, 2022 at 4:11 PM Heinrich Schuchardt > 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 > > 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 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 >> > >