summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-11-17 12:49:14 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2021-11-17 08:42:37 +0100
commite25230e2439f5a8f973a66fce5ee2d2bddf20883 (patch)
tree9741c774ed84a1411fe5087e8ecdcef63043ca66 /arch/x86
parent81ceab95360295cef146e89a1cd1cd5e590aa75e (diff)
downloadbarebox-e25230e2439f5a8f973a66fce5ee2d2bddf20883.tar.gz
barebox-e25230e2439f5a8f973a66fce5ee2d2bddf20883.tar.xz
kbuild: remove unneeded -nostdlib flag
The -nostdlib option requests the compiler to not use the standard system startup files or libraries when linking. arch/kvm/Makefile adds it to KBUILD_CFLAGS/AFLAGS, but it does not make sense because those are unrelated to linking. arch/{mips,riscv,x86}/Makefile passes it to the linker, but it is not sensible either. As noted above, adding -nostdlib makes sense only when $(CC) is used as a linker driver, but $(LD) is directly used for linking barebox. (ld.bfd/ld.lld recognizes the -nostdlib flag, but its behavior is obscure, and unneeded here.) Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.barebox.org/20211117034918.1226358-2-masahiroy@kernel.org Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index fd871ca214..9fc64cc047 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -54,7 +54,7 @@ lds-$(CONFIG_X86_64) := arch/x86/mach-efi/elf_x86_64_efi.lds
cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \
-T $(lds-y) \
- -shared -Bsymbolic -nostdlib -znocombreloc \
+ -shared -Bsymbolic -znocombreloc \
--whole-archive $(BAREBOX_OBJS) \
--no-whole-archive \
$(filter-out $(BAREBOX_LDS) $(BAREBOX_OBJS) FORCE ,$^)