riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 24 Aug 2018 08:33:53 +0000 (17:33 +0900)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 23 Oct 2018 00:38:15 +0000 (17:38 -0700)
This becomes much neater in Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/Kconfig
arch/riscv/Makefile

index 093361e2298c0b140c9821c9b361d22092f6c5c3..bb80d3ea82fd20cae1d4734f7f3ef04c36739985 100644 (file)
@@ -113,6 +113,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
index 61ec42405ec9630082beb941cb58a963127c13ad..33700e4bfc3bc70696c6788453c26d367e4ee754 100644 (file)
@@ -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