aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2015-01-15 12:07:33 +0000
committerAlex Shi <alex.shi@linaro.org>2016-04-13 16:18:33 +0800
commite2ce943c7b3b5857d35dc14629a10bc6f7124cf0 (patch)
treeec89e3cfb37a61de559ff21a568b68487aa0edac
parent43ff2aeb8a86611189813ccf3b428742ef9e78db (diff)
downloadlinux-linaro-stable-v3.18/topic/KASAN.tar.gz
arm64: kill off the libgcc dependencyv3.18/topic/KASAN
The arm64 kernel builds fine without the libgcc. Actually it should not be used at all in the kernel. The following are the reasons indicated by Russell King: Although libgcc is part of the compiler, libgcc is built with the expectation that it will be running in userland - it expects to link to a libc. That's why you can't build libgcc without having the glibc headers around. [...] Meanwhile, having the kernel build the compiler support functions that it needs ensures that (a) we know what compiler support functions are being used, (b) we know the implementation of those support functions are sane for use in the kernel, (c) we can build them with appropriate compiler flags for best performance, and (d) we remove an unnecessary dependency on the build toolchain. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit d67703a8a69eecc8367bb9f848640b9efd430337) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--arch/arm64/Makefile3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ad2e9ad9dab..332df77c3ddf 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -15,8 +15,6 @@ CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
GZFLAGS :=-9
-LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
-
KBUILD_DEFCONFIG := defconfig
KBUILD_CFLAGS += -mgeneral-regs-only
@@ -61,7 +59,6 @@ core-$(CONFIG_KVM) += arch/arm64/kvm/
core-$(CONFIG_XEN) += arch/arm64/xen/
core-$(CONFIG_CRYPTO) += arch/arm64/crypto/
libs-y := arch/arm64/lib/ $(libs-y)
-libs-y += $(LIBGCC)
libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/
# Default target when executing plain make