From patchwork Sun Oct 27 11:23:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1184976 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ETHikU/h"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 471FpK1Ytkz9sP4 for ; Sun, 27 Oct 2019 22:23:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3EFA6848C2; Sun, 27 Oct 2019 11:23:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JosAa5mJ7jjA; Sun, 27 Oct 2019 11:23:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 41A9285166; Sun, 27 Oct 2019 11:23:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 99D571BF332 for ; Sun, 27 Oct 2019 11:23:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8476085F96 for ; Sun, 27 Oct 2019 11:23:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2QSmpxHiygUk for ; Sun, 27 Oct 2019 11:23:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id A345B85F8D for ; Sun, 27 Oct 2019 11:23:14 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id c2so6934462wrr.10 for ; Sun, 27 Oct 2019 04:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6N+OIJYM1iUG3gpWnkr9kZAWe/p3/Z2VpbbuS3AIsoI=; b=ETHikU/h7Gqt2iYnTG7tlR5A9bPUbpBfB9/SPcCnoxoxdntyFjfpiitZQbMl8DfCE0 LNluJ9zak1EyjLZD7LebmHaKjlic/av+4NG6Y4OAmmWVpE+TO5geDgSfz8HJleauhka8 Gn7npXoPAZu194gYODLvY+KZkL9aJkWOl2loUZkxfbJHjyQgtterTBOh8SXNUO/uOmco r43bTORr8IqDFmuIcfsJVVREwjX/f5kWVRn5XaKFhs2lhgvVc2tmn/m99Wed6ukePjtO xayZSbymyVzFa+48L9jmAXlTal4baf+tPkrK6KDTiznpku88GWfy++6DPdsrkn3Lt9nE lcdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=6N+OIJYM1iUG3gpWnkr9kZAWe/p3/Z2VpbbuS3AIsoI=; b=KgLCkyG+y0F9ycHXC3jAOB5eeU6dURf/iAd+ts1EnwwhJVQ2JrFK5i3NXgUtU6je9I VfUg/ELG/NMvdNNyv7FWK8w4gjy80okdPASuPyhqHcuARfxVlu4ssCQffZiO5ncFKS5q YcOER8+/YvX/p/FuYe+Fd3eEou/Fw945NfNPx87X9P8u7XcumUG2e8OoIXV9EvOEBa1r xqZjX5dFVXtvmLIeS/ohKpaCZC40HWvzXt8m5HcFFiRUZbTLyqJ3/mvbovEixvPCOruO 0OHmVTb+WZI0diOIDSv7mknIx0AJ6YWdgL734xIgfGsZVoqlyABYz9/CZEp4UE3E7kPY oS4w== X-Gm-Message-State: APjAAAU9/GVd47Ig2KpXzY/mvzbtELOsI56T+lSnznd+hZeynpr8Ioep N8RzgHCcDVome/FzbpAMedF8K7ib X-Google-Smtp-Source: APXvYqxsCDMIKcaaDCuPu94vrqV9qP+55ycfgxCj4dFix3K//yILPUSkuTusGDB/fdU7kLtUJOd+KA== X-Received: by 2002:adf:e403:: with SMTP id g3mr10283129wrm.128.1572175392819; Sun, 27 Oct 2019 04:23:12 -0700 (PDT) Received: from scaer.lyon.intranet (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id x205sm9877550wmb.5.2019.10.27.04.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 04:23:11 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 27 Oct 2019 12:23:06 +0100 Message-Id: <20191027112306.346-1-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] arc/riscv: get rid of immediate-assignment X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Corbin , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Yann E. MORIN Cc: Mark Corbin Cc: Arnout Vandecappelle --- Changes v1 -> v2: - add MArk in Cc - further simplify the code (Arnout) --- arch/arch.mk.riscv | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv index f3bf2b3467..204e78a57f 100644 --- a/arch/arch.mk.riscv +++ b/arch/arch.mk.riscv @@ -5,26 +5,16 @@ ifeq ($(BR2_riscv),y) -ifeq ($(BR2_RISCV_64),y) -GCC_TARGET_ARCH := rv64i -else -GCC_TARGET_ARCH := rv32i -endif - -ifeq ($(BR2_RISCV_ISA_RVM),y) -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m -endif -ifeq ($(BR2_RISCV_ISA_RVA),y) -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a -endif -ifeq ($(BR2_RISCV_ISA_RVF),y) -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f -endif -ifeq ($(BR2_RISCV_ISA_RVD),y) -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d -endif -ifeq ($(BR2_RISCV_ISA_RVC),y) -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c -endif +GCC_TARGET_ARCH = \ + $(subst $(space),, \ + rv \ + $(if $(BR2_RISCV_64),64,32) \ + i \ + $(if $(BR2_RISCV_ISA_RVM),m) \ + $(if $(BR2_RISCV_ISA_RVA),a) \ + $(if $(BR2_RISCV_ISA_RVF),f) \ + $(if $(BR2_RISCV_ISA_RVD),d) \ + $(if $(BR2_RISCV_ISA_RVC),c) \ + ) endif