From patchwork Thu Sep 19 15:40:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 1164738 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="HnQ7QPTx"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46Z1Kt2mzXz9s7T for ; Fri, 20 Sep 2019 01:41:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 913092221C; Thu, 19 Sep 2019 15:41:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A5DmfIVjYEZF; Thu, 19 Sep 2019 15:41:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 734F0220EF; Thu, 19 Sep 2019 15:41:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1EF041BF47A for ; Thu, 19 Sep 2019 15:41:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1B82B220EF for ; Thu, 19 Sep 2019 15:41:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2+2wxEfpAIdJ for ; Thu, 19 Sep 2019 15:41:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by silver.osuosl.org (Postfix) with ESMTPS id 6E2112206E for ; Thu, 19 Sep 2019 15:41:28 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id 5so5176433wmg.0 for ; Thu, 19 Sep 2019 08:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jdowZLwYTD49fYhuWhLNUnmu9FLFXwgTf8rOXK76Vg8=; b=HnQ7QPTxpPHRMKasYSQysc81xJn6in3Zf66lWeNlpd5OONPVj4hnM6VN4X5O6u6f3s XjXXrZ9OgSMRrjQ25gpoVteIm0iUUZqgZrqRPjFBqF5cZq/fhxGt+7c+u5AyoR7XsUZr dJIc0El8U30nER/kA0iGRXhNkH6FUkJ0YkPBDOFEfvVYAJfjJFHWN4UBYJ4IMENTcR7x 3KnyS92qmEzXuuU04DKiNyAO38iwWrbnvkHnemajHW2grTiHjYFrJKe6/6yPvLY2xzkK k32DZ77rBw2Hv1PId+i9sy/jqYullUTvsiDU32Nw6H2mBmJYxaayxQQospC0frm4tBQK wVIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jdowZLwYTD49fYhuWhLNUnmu9FLFXwgTf8rOXK76Vg8=; b=Q8ZnOuQM6PfC5Fkx9A17H2avyYkInCItFVObEEpo07Giq94hR8Ze9k/sae+rFcprCg 4h/p2Oeg99SQ/R89FNc7ettnIrfj5AMnjS7B/LZ9PVTH21K6PBc6lnJpxoXtcNm9TySF Kd6tmr072KaMEZMK31ZonlU8f4vTNYryabaOpVO736xMf7+5MDCgnstbqNW+bNwlExvo wncl64lA8VD9VwDr2E7PO22ZqcNHmVJ2ZysAL6Sjdsr+CoHIXT8MgZco7Q17/YMylabf zfnAY/c4DHi7nCnSna3tET8rY2r7ATAwoiJ+OTVgMV2hpf2/c75t1BerNPdicnq6OtyC mnVg== X-Gm-Message-State: APjAAAWQalnM0DAEjOKvp9G0oKRaGnnoS/mH6LFy42oN1hcTrzv/stRX 0ub/pWqTcMprA9lFEDSDfK6nNUDdtkQ= X-Google-Smtp-Source: APXvYqxvOfxkvOu75+yJHDnlmEbHNhfW/HpW3AvktsF71Eg7gMgEDFe3OqGegWm4VsxtcNOL786OwA== X-Received: by 2002:a05:600c:389:: with SMTP id w9mr3230983wmd.139.1568907686567; Thu, 19 Sep 2019 08:41:26 -0700 (PDT) Received: from godzilla.lym.embecosm-corp.com (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id z3sm5736109wmi.30.2019.09.19.08.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 08:41:25 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Thu, 19 Sep 2019 16:40:35 +0100 Message-Id: <20190919154036.23245-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] arch/riscv: set the default float ABI based on ISA extensions 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 , Palmer Dabbelt Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch sets the default floating point ABI based on the ISA extensions that have been selected rather than defaulting to soft float. For 64-bit: ISA 'D' selects lp64d ISA 'F' selects lp64f Otherwise select lp64 For 32-bit: ISA 'D' selects ilp32d ISA 'F' selects ilp32f Otherwise select ilp32 This change was proposed by Palmer Dabbelt at SiFive. Signed-off-by: Mark Corbin Reviewed-by: Palmer Dabbelt --- arch/Config.in.riscv | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv index bdd2672602..1fc20e5de7 100644 --- a/arch/Config.in.riscv +++ b/arch/Config.in.riscv @@ -80,8 +80,12 @@ endchoice choice prompt "Target ABI" - default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64 - default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64 + default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD + default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64 + default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD + default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64 config BR2_RISCV_ABI_ILP32 bool "ilp32"