Skip to content

Commit

Permalink
UPSTREAM: arm64: support __int128 with clang
Browse files Browse the repository at this point in the history
Commit fb8722735f50 ("arm64: support __int128 on gcc 5+") added support
for arm64 __int128 with gcc with a version-conditional, but neglected to
enable this for clang, which in fact appears to support aarch64 __int128.
This commit therefore enables it if the compiler is clang, using the
same type of makefile conditional used elsewhere in the tree.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit ad40bdafb495f30e5af837e15b3c2a4cb2176e47)
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Raphiel Rollerscaperers <raphielscape@outlook.com>
Signed-off-by: Lau <laststandrighthere@gmail.com>
  • Loading branch information
zx2c4 authored and Jebaitedneko committed Aug 26, 2020
1 parent e9b0051 commit d51f4c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)
KBUILD_CFLAGS += -fno-pic
KBUILD_AFLAGS += $(lseinstr) $(vdso32)

ifeq ($(cc-name),clang)
KBUILD_CFLAGS += -DCONFIG_ARCH_SUPPORTS_INT128
else
KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128)
endif

ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
KBUILD_CPPFLAGS += -mbig-endian
Expand Down

0 comments on commit d51f4c4

Please sign in to comment.