All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
@ 2018-08-24  8:33 ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-08-24  8:33 UTC (permalink / raw)
  To: Palmer Dabbelt, Albert Ou, linux-riscv; +Cc: Masahiro Yamada, linux-kernel

This becomes much neater in Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
@ 2018-08-24  8:33 ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-08-24  8:33 UTC (permalink / raw)
  To: linux-riscv

This becomes much neater in Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
  2018-08-24  8:33 ` Masahiro Yamada
@ 2018-09-06  9:45   ` Palmer Dabbelt
  -1 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2018-09-06  9:45 UTC (permalink / raw)
  To: yamada.masahiro; +Cc: aou, linux-riscv, yamada.masahiro, linux-kernel

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 <yamada.masahiro@socionext.com>
> ---
>
>  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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
@ 2018-09-06  9:45   ` Palmer Dabbelt
  0 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2018-09-06  9:45 UTC (permalink / raw)
  To: linux-riscv

On Fri, 24 Aug 2018 01:33:53 PDT (-0700), yamada.masahiro at socionext.com wrote:
> This becomes much neater in Kconfig.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
  2018-09-06  9:45   ` Palmer Dabbelt
@ 2018-09-06 10:45     ` Masahiro Yamada
  -1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-09-06 10:45 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: aou, linux-riscv, Linux Kernel Mailing List

Hi Palmer,

2018-09-06 18:45 GMT+09:00 Palmer Dabbelt <palmer@sifive.com>:
> 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 <yamada.masahiro@socionext.com>
>> ---
>>
>>  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
@ 2018-09-06 10:45     ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-09-06 10:45 UTC (permalink / raw)
  To: linux-riscv

Hi Palmer,

2018-09-06 18:45 GMT+09:00 Palmer Dabbelt <palmer@sifive.com>:
> On Fri, 24 Aug 2018 01:33:53 PDT (-0700), yamada.masahiro at socionext.com
> wrote:
>>
>> This becomes much neater in Kconfig.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>>  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-06 10:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24  8:33 [PATCH] riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig Masahiro Yamada
2018-08-24  8:33 ` Masahiro Yamada
2018-09-06  9:45 ` Palmer Dabbelt
2018-09-06  9:45   ` Palmer Dabbelt
2018-09-06 10:45   ` Masahiro Yamada
2018-09-06 10:45     ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.