Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp395124imm; Thu, 6 Sep 2018 04:19:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbwdM+y+CC0hxzwd7SzdzbgWdjYtwdQjwifloKm3gjgS8cSS1bV1/IO/AH8CYlYoH9hJ/7c X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr2241326pgq.382.1536232793075; Thu, 06 Sep 2018 04:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536232793; cv=none; d=google.com; s=arc-20160816; b=OeTJboE50+nmfcyofkLXMKkPHyPU6NpC0Vr9XCr+YFdnm8rVUEPN3ublQNtVk6JBxs r6R6NzHd+uO/3hI5MOaLCxFWldb4x+JqwN1RAJNyF4GANM57XBcrT0/RjgoiEZQuYp3x 9WGvqaky7jwQ6rj/VBZqsvl5Nz7tmkpJu4H//KYJH/25ZOGuxrL3ZiN0+w2jwNV9mtoN 8t8pMudJH5N1fLhX4te/yGzAjbCbFxlA37MljlyiYa2V1bmTL+HMCioaONPZygcoUjdw /IVfNK7Wu+HDQlEI8C7r9WL9rmg4I6memDI5HxDpdJ/G3nPBFWe6Pz9xy/ouLaqjrx8Z r8sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter; bh=avCLswmm1eKfBBw5ny7RW8Khi9EfwYW60pAKGtyHedE=; b=g0pPCxyQrctQcfkgTwZGgOkVqIhBKyylPQc6xMaT9hGniCqbZcqzWmUkF5zPZFyGK2 IvzEV75a5oDUOD0K7HdJ3xlYMLwmYD1Sv9Va8P1QsAeFqeIe8nxshFpPBcMFs10JqHTn 8ihLrQh1Imru2Kg/qB1H2AvisAtEInZrbSXb4MM9Rcb6xWyRRX1GAZL+ZTNs8sFB0aBw 7d1qzidCqJ/TacZcZIYNTszGMzDchHpsmOK5nPpxxWmQTNeGnpd7Ivmp8H7/1x5+ssbR ToPdISKi/QyCDz4q44oc4JK79U2mgrdyxurdKwqzvFzkJJ90d5eNe1oUIfTkHz4tKXsf 1y9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CzX6JlLf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64-v6si4393767pgd.199.2018.09.06.04.19.37; Thu, 06 Sep 2018 04:19:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CzX6JlLf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbeIFPVg (ORCPT + 99 others); Thu, 6 Sep 2018 11:21:36 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:49819 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725918AbeIFPVg (ORCPT ); Thu, 6 Sep 2018 11:21:36 -0400 Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (authenticated) by conssluserg-01.nifty.com with ESMTP id w86AkbF3024289 for ; Thu, 6 Sep 2018 19:46:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com w86AkbF3024289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1536230798; bh=avCLswmm1eKfBBw5ny7RW8Khi9EfwYW60pAKGtyHedE=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=CzX6JlLfZaH9nL7AW+KBgOR/Fn42SoEdMF0lHz4SBBPJhsP4lP4bRuuSvHp2V1IM4 hZhEQCFEjC2Do7oeidiX/FcHQJ2BolU01VHoyOyJSmgfJ3mm3bSd0MdFL6AIBw94Q3 rsETjxemykk1+7h8JV8066UXefpx4sBzRPKVN+NRPqdNqlQrtVDWDBwyph9dbSmbz4 hhHZMYCKesSIoXN5tktiQ7/Iig9t5LA2BXj4nN2DuGZMxu7SsJtxloh4o5yY5j2z6J XaTqvg91gkZkxrjvJ4vgZ0Liiu5Um5Fv+uBYoolo6OZMKlEDT8jo4EeEJlGmNbGZXB ANQCKKUQcsenA== X-Nifty-SrcIP: [209.85.222.51] Received: by mail-ua1-f51.google.com with SMTP id w7-v6so8317238uan.9 for ; Thu, 06 Sep 2018 03:46:38 -0700 (PDT) X-Gm-Message-State: APzg51Csr7nFZ440aHxaEF67kNKhe+V+cQeDL0NRVjNIszZjyr0LDfz0 IXCSjBObnIiEmOvl1H5r7sFTXdhn5qXWhhwLe0o= X-Received: by 2002:ab0:4ad7:: with SMTP id t23-v6mr644198uae.35.1536230796948; Thu, 06 Sep 2018 03:46:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:7111:0:0:0:0:0 with HTTP; Thu, 6 Sep 2018 03:45:56 -0700 (PDT) In-Reply-To: References: <1535099634-29439-1-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Thu, 6 Sep 2018 19:45:56 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig To: Palmer Dabbelt Cc: aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Palmer, 2018-09-06 18:45 GMT+09:00 Palmer Dabbelt : > On Fri, 24 Aug 2018 01:33:53 PDT (-0700), yamada.masahiro@socionext.com > wrote: >> >> This becomes much neater in Kconfig. >> >> Signed-off-by: Masahiro Yamada >> --- >> >> arch/riscv/Kconfig | 1 + >> arch/riscv/Makefile | 2 -- >> 2 files changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> index a344980..ed81df4 100644 >> --- a/arch/riscv/Kconfig >> +++ b/arch/riscv/Kconfig >> @@ -112,6 +112,7 @@ config ARCH_RV32I >> config ARCH_RV64I >> bool "RV64I" >> select 64BIT >> + select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 >> select HAVE_FUNCTION_TRACER >> select HAVE_FUNCTION_GRAPH_TRACER >> select HAVE_FTRACE_MCOUNT_RECORD >> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile >> index 61ec424..33700e4 100644 >> --- a/arch/riscv/Makefile >> +++ b/arch/riscv/Makefile >> @@ -25,8 +25,6 @@ ifeq ($(CONFIG_ARCH_RV64I),y) >> >> KBUILD_CFLAGS += -mabi=lp64 >> KBUILD_AFLAGS += -mabi=lp64 >> - >> - KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, >> -DCONFIG_ARCH_SUPPORTS_INT128) >> >> KBUILD_MARCH = rv64im >> KBUILD_LDFLAGS += -melf64lriscv > > > FWIW, while there isn't an official RISC-V GCC port that old (IIRC 6 was our > first version, but it may have been 7) there are out-of-tree ports so I > think this is OK to leave as it stands. It is not my point. I would not argue the minimum GCC version for RISC-V. My motivation: [1] Remove (or move to Kconfig) $(call cc-ifversion, ...) from Makefile. If you test the GCC version in arch/riscv/Makefile, scripts/gcc-version.sh is invoked for every incremental build. [2] Follow the macro naming convention We add CONFIG_ prefix to macros defined in Kconfig. I know some CONFIG options are defined in Makefiles, but my ultimate goal is to move all CONFIG options to Kconfig. See arch/{arm64,x86}/Kconfig that select ARCH_SUPPORTS_INT128 If you think GCC 6 or 7 is the minimum, please feel free to remove "if GCC_VERSION >= 50000", but it is not my main interest here (and it should be done as a separate work). -- Best Regards Masahiro Yamada