klibc-bot for Ben Hutchings
2020-Dec-13 00:24 UTC
[klibc] [klibc:master] Move linker option probing to Kbuild.klibc
Commit-ID: ddbeec5d4e3170da62f7c0e4db622c1d5ef22118 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=ddbeec5d4e3170da62f7c0e4db622c1d5ef22118 Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Thu, 27 Aug 2020 18:24:05 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 12 Dec 2020 23:53:05 +0100 [klibc] Move linker option probing to Kbuild.klibc Compiler option probing is done in Kbuild.klibc, so move the check for lld and the related option definition to there as well. Also stop exporting LD_IMAGE_BASE_OPT, as it's only needed in the architecture MCONFIG which is included here. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- Makefile | 3 --- scripts/Kbuild.klibc | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c8325154..c99b962f 100644 --- a/Makefile +++ b/Makefile @@ -27,9 +27,6 @@ export NM := $(KLIBCROSS)nm export OBJCOPY := $(KLIBCROSS)objcopy export OBJDUMP := $(KLIBCROSS)objdump -LLD := $(shell $(LD) --version 2>&1 | grep LLD) -export LD_IMAGE_BASE_OPT=$(if $(LLD),--image-base,-Ttext-segment) - NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include) ARCH := $(shell uname -m | sed -e s/i.86/i386/ \ diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc index 28b5e856..e0dfcd0c 100644 --- a/scripts/Kbuild.klibc +++ b/scripts/Kbuild.klibc @@ -84,6 +84,9 @@ KLIBCCFLAGS : KLIBCARCHINCFLAGS KLIBCCRTSHARED := $(KLIBCOBJ)/interp.o +LLD := $(shell $(LD) --version 2>&1 | grep LLD) +LD_IMAGE_BASE_OPT := $(if $(LLD),--image-base,-Ttext-segment) + # Arch specific definitions for klibc include $(srctree)/$(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG