Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Commit

Permalink
Revert "ANDROID: HACK: arm64: use -mno-implicit-float instead of -mge…
Browse files Browse the repository at this point in the history
…neral-regs-only"

I am not supporting use of Clang 5.0 in this tree. Pie uses Clang 6.0 by
default for userland, same should be used for the kernel.

This reverts commit e07bcf7.

Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Albert I <[email protected]>
  • Loading branch information
nathanchance authored and johnmart19 committed Feb 10, 2021
1 parent eee3ec5 commit 11fdd50
Showing 1 changed file with 1 addition and 41 deletions.
42 changes: 1 addition & 41 deletions arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,47 +50,7 @@ $(warning LSE atomics not supported by binutils)
endif
endif

ifeq ($(CONFIG_COMPAT_VDSO), y)
CROSS_COMPILE_ARM32 ?= $(CONFIG_CROSS_COMPILE_ARM32:"%"=%)

# Check that the user has provided a valid prefix for the 32-bit toolchain.
# To prevent selecting the system $(cc-name) by default, the prefix is not
# allowed to be empty, unlike CROSS_COMPILE. In the unlikely event that the
# system $(cc-name) is actually the 32-bit ARM compiler to be used, the
# variable can be set to the dirname (e.g. CROSS_COMPILE_ARM32=/usr/bin/).
# Note: this Makefile is read both before and after regenerating the config
# (if needed). Any warning appearing before the config has been regenerated
# should be ignored. If the error is triggered and you set
# CONFIG_CROSS_COMPILE_ARM32, set CROSS_COMPILE_ARM32 to an appropriate value
# when invoking make and fix CONFIG_CROSS_COMPILE_ARM32.
ifeq ($(CROSS_COMPILE_ARM32),)
$(error CROSS_COMPILE_ARM32 not defined or empty, the compat vDSO will not be built)
else ifeq ($(cc-name),clang)
export CLANG_TRIPLE_ARM32 ?= $(CROSS_COMPILE_ARM32)
export CLANG_TARGET_ARM32 := --target=$(notdir $(CLANG_TRIPLE_ARM32:%-=%))
export GCC_TOOLCHAIN32_DIR := $(dir $(shell which $(CROSS_COMPILE_ARM32)ld))
export GCC_TOOLCHAIN32 := $(realpath $(GCC_TOOLCHAIN32_DIR)/..)
export CLANG_PREFIX32 := --prefix=$(GCC_TOOLCHAIN32_DIR)
export CLANG_GCC32_TC := --gcc-toolchain=$(GCC_TOOLCHAIN32)
export CONFIG_VDSO32 := y
vdso32 := -DCONFIG_VDSO32=1
else ifeq ($(shell which $(CROSS_COMPILE_ARM32)$(cc-name) 2> /dev/null),)
$(error $(CROSS_COMPILE_ARM32)$(cc-name) not found, check CROSS_COMPILE_ARM32)
else
export CROSS_COMPILE_ARM32
export CONFIG_VDSO32 := y
vdso32 := -DCONFIG_VDSO32=1
endif
endif

ifeq ($(cc-name),clang)
# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792.
# TODO: revert when this is fixed in LLVM.
KBUILD_CFLAGS += -mno-implicit-float
else
KBUILD_CFLAGS += -mgeneral-regs-only
endif
KBUILD_CFLAGS += $(lseinstr) $(vdso32)
KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr)
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)
KBUILD_CFLAGS += -fno-pic
Expand Down

0 comments on commit 11fdd50

Please sign in to comment.