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 76E5AA0548; Wed, 8 Jun 2022 09:23:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E5834021F; Wed, 8 Jun 2022 09:23:26 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1A5634021D for ; Wed, 8 Jun 2022 09:23:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654673004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=maT4ncVGEa6u6mMTAc+/IZ8Zk6CmjJdOycrV8/EQnC4=; b=g/Y4j3297GwzoPeEDt9Uzv4wdMN0CEepEi/e0B9J4UqjDvnnGQUgMMV6lR/FSHHTy3WqGV UPG+YYM4WQb4rKfDK1Ebt+VvWvo1QWIvSLnGi+QDB4j8Mq+0OZ5cjt37id48I9r9xgoybc dek1MoYND7CVvoLehrUw23tq2Di210A= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-282--us-rPBsO92zTXp2WcIIKw-1; Wed, 08 Jun 2022 03:23:22 -0400 X-MC-Unique: -us-rPBsO92zTXp2WcIIKw-1 Received: by mail-lf1-f72.google.com with SMTP id h35-20020a0565123ca300b00479113319f9so8069007lfv.0 for ; Wed, 08 Jun 2022 00:23:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=maT4ncVGEa6u6mMTAc+/IZ8Zk6CmjJdOycrV8/EQnC4=; b=vOeuzZM92+fHZl/D+pR2Re/Jwkbb6W2zeZEfIJD1Wi6Lc8sK/1mJTmQospTCnWpmMK RDrqaFX3De08wkuU49ap+Q5ZRwpoKUOYdSNIg0qc56fW4JniutP4yjrnjPzw3V6nHDlg 7ow5zD2DtyWiqDhzK6v7l7BX7U2ZK6vwmEbaY7V6IqJzCP8WlR/eh5C5gmhwt49bD4BR 02x/jSZ6JCRQRWl4zRKT9ayqIX3jf5DWDZz4w2UgbYrpcztlIBVodYdYSzc8c65zFwvG oNcxLrY+vfmaxcyoJQkpuj6ovDBv/75wE3JW19M8N0EXPZl+uW9ZY4hGzeAheAtrFx3l ID2A== X-Gm-Message-State: AOAM530NT5ig4l33RUrFDmTxKatUdpx10CKvM8wNN4VxnwQzQV4fKVjH pxuEqsPXdZE0avWWS1BaXgf01wly0Wo0EPrwXrOozU6ryP2Ls6orW2t51L5/Yw2X2aR6gPqER2r 7spQzB9II4GXp17qLB9I= X-Received: by 2002:a05:651c:1781:b0:247:daa7:4358 with SMTP id bn1-20020a05651c178100b00247daa74358mr55738796ljb.477.1654673001327; Wed, 08 Jun 2022 00:23:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvkIHrl8NDfjQiAy1z/I4Nii9gtL3kUcoZMsGLW2FOUalI3K6jpIaa1DZFrEGtnkVU9bjutk/9OPW4mjTCXHY= X-Received: by 2002:a05:651c:1781:b0:247:daa7:4358 with SMTP id bn1-20020a05651c178100b00247daa74358mr55738790ljb.477.1654673001078; Wed, 08 Jun 2022 00:23:21 -0700 (PDT) MIME-Version: 1.0 References: <20220530141103.42444-1-heinrich.schuchardt@canonical.com> In-Reply-To: <20220530141103.42444-1-heinrich.schuchardt@canonical.com> From: David Marchand Date: Wed, 8 Jun 2022 09:23:09 +0200 Message-ID: Subject: Re: [PATCH] Fix RISC-V builds To: Heinrich Schuchardt Cc: dev , Stanislaw Kardach Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello, On Mon, May 30, 2022 at 4:11 PM Heinrich Schuchardt wrote: > > Building on RISC-V results in an error > > cc: error: =E2=80=98-march=3Dnative=E2=80=99: ISA string must begin w= ith rv32 or rv64 > > As GCC does not support -march=3Dnative 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. > --- > 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 =3D configuration_data() > # set up some global vars for compiler, platform, configuration, etc. > cc =3D meson.get_compiler('c') > > -add_project_arguments('-march=3Dnative', language: 'c') > +target =3D target_machine.cpu_family() > +if (target !=3D 'riscv64') > + add_project_arguments('-march=3Dnative', language: 'c') > +endif Would the below snippet work? cc.has_argument('-march=3Dnative'') add_project_arguments('-march=3Dnative', language: 'c') endif > > if get_option('enable-avx') and cc.has_argument('-mavx') > add_project_arguments('-mavx', language: 'c') > -- > 2.36.1 > --=20 David Marchand