Skip to content

Commit d67703a

Browse files
haokexinctmarinas
authored andcommitted
arm64: kill off the libgcc dependency
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 <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 0ce339a commit d67703a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/arm64/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
1515
OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
1616
GZFLAGS :=-9
1717

18-
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
19-
2018
KBUILD_DEFCONFIG := defconfig
2119

2220
KBUILD_CFLAGS += -mgeneral-regs-only
@@ -50,7 +48,6 @@ core-$(CONFIG_KVM) += arch/arm64/kvm/
5048
core-$(CONFIG_XEN) += arch/arm64/xen/
5149
core-$(CONFIG_CRYPTO) += arch/arm64/crypto/
5250
libs-y := arch/arm64/lib/ $(libs-y)
53-
libs-y += $(LIBGCC)
5451
libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/
5552

5653
# Default target when executing plain make

0 commit comments

Comments
 (0)