diff mbox series

[v2,21/21] arm64: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig

Message ID 1522128575-5326-22-git-send-email-yamada.masahiro@socionext.com
State Superseded
Headers show
Series kconfig: move compiler capability tests to Kconfig | expand

Commit Message

Masahiro Yamada March 27, 2018, 5:29 a.m. UTC
This becomes much neater in Kconfig.

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

---

Changes in v2:
  - Newly added

 arch/arm64/Kconfig  | 1 +
 arch/arm64/Makefile | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

-- 
2.7.4

Comments

Will Deacon March 27, 2018, 5:28 p.m. UTC | #1
On Tue, Mar 27, 2018 at 02:29:35PM +0900, Masahiro Yamada wrote:
> This becomes much neater in Kconfig.

> 

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

> ---

> 

> Changes in v2:

>   - Newly added

> 

>  arch/arm64/Kconfig  | 1 +

>  arch/arm64/Makefile | 2 --

>  2 files changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig

> index 7381eeb..0c97f40 100644

> --- a/arch/arm64/Kconfig

> +++ b/arch/arm64/Kconfig

> @@ -43,6 +43,7 @@ config ARM64

>  	select ARCH_USE_QUEUED_RWLOCKS

>  	select ARCH_SUPPORTS_MEMORY_FAILURE

>  	select ARCH_SUPPORTS_ATOMIC_RMW

> +	select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000

>  	select ARCH_SUPPORTS_NUMA_BALANCING

>  	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION

>  	select ARCH_WANT_FRAME_POINTERS

> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile

> index b481b4a..7318165 100644

> --- a/arch/arm64/Makefile

> +++ b/arch/arm64/Makefile

> @@ -57,8 +57,6 @@ KBUILD_AFLAGS	+= $(lseinstr) $(brokengasinst)

>  KBUILD_CFLAGS	+= $(call cc-option,-mabi=lp64)

>  KBUILD_AFLAGS	+= $(call cc-option,-mabi=lp64)

>  

> -KBUILD_CFLAGS	+= $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128)

> -


If this does what it claims to do, then I agree that it's much cleaner!

Acked-by: Will Deacon <will.deacon@arm.com>


Will
Kees Cook March 28, 2018, 11:55 a.m. UTC | #2
On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> This becomes much neater in Kconfig.

>

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


Is there a reason this doesn't have a cc-option test, or was this a
silent addition to the compiler? (And as such, should there be a
comment for this in the Kconfig?)

Regardless:

Reviewed-by: Kees Cook <keescook@chromium.org>


-Kees

-- 
Kees Cook
Pixel Security
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7381eeb..0c97f40 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -43,6 +43,7 @@  config ARM64
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_SUPPORTS_MEMORY_FAILURE
 	select ARCH_SUPPORTS_ATOMIC_RMW
+	select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000
 	select ARCH_SUPPORTS_NUMA_BALANCING
 	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
 	select ARCH_WANT_FRAME_POINTERS
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index b481b4a..7318165 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -57,8 +57,6 @@  KBUILD_AFLAGS	+= $(lseinstr) $(brokengasinst)
 KBUILD_CFLAGS	+= $(call cc-option,-mabi=lp64)
 KBUILD_AFLAGS	+= $(call cc-option,-mabi=lp64)
 
-KBUILD_CFLAGS	+= $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128)
-
 ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
 KBUILD_CPPFLAGS	+= -mbig-endian
 CHECKFLAGS	+= -D__AARCH64EB__