]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kbuild: add --hash-style= and --build-id unconditionally
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 13 Jul 2019 04:01:10 +0000 (13:01 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 17 Jul 2019 13:37:51 +0000 (22:37 +0900)
As commit bf3201b4ea84 ("mips: vdso: drop unnecessary cc-ldoption")
explained, these flags are supported by the minimal required version
of binutils. They are supported by ld.lld too.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Makefile
arch/arm/vdso/Makefile
arch/arm64/kernel/vdso32/Makefile
arch/sparc/vdso/Makefile
arch/x86/entry/vdso/Makefile

index 2c5d00ba537e3f761a02b7f7f83a8d30180a2193..969182105dbd6c209d7372d35a307c9fa5fea6cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -900,10 +900,8 @@ KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
 KBUILD_AFLAGS   += $(ARCH_AFLAGS)   $(KAFLAGS)
 KBUILD_CFLAGS   += $(ARCH_CFLAGS)   $(KCFLAGS)
 
-# Use --build-id when available.
-LDFLAGS_BUILD_ID := $(call ld-option, --build-id)
-KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
-LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
+KBUILD_LDFLAGS_MODULE += --build-id
+LDFLAGS_vmlinux += --build-id
 
 ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
 LDFLAGS_vmlinux        += $(call ld-option, -X,)
index ca85df2477751d397d38a1b36e1ec4424cf55163..87b7769214e079c3f75bf9c89e4d965e295f117a 100644 (file)
@@ -13,8 +13,7 @@ ccflags-y += -DDISABLE_BRANCH_PROFILING
 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
            -z max-page-size=4096 -nostdlib -shared $(ldflags-y) \
-           $(call ld-option, --hash-style=sysv) \
-           $(call ld-option, --build-id) \
+           --hash-style=sysv --build-id \
            -T
 
 obj-$(CONFIG_VDSO) += vdso.o
index 288c14d30b45ce9a62ee27bd7b1fcd0e206970cc..60a4c6239712522bf5f13350e8a7facb41f5e319 100644 (file)
@@ -96,8 +96,8 @@ VDSO_LDFLAGS := $(VDSO_CPPFLAGS)
 VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
 VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
 VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft
-VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--hash-style=sysv)
-VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--build-id)
+VDSO_LDFLAGS += -Wl,--hash-style=sysv
+VDSO_LDFLAGS += -Wl,--build-id
 VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd)
 
 
index 5a9e4e1f9f81090e1cd78acdf9bb40ec981e513c..324a23947585e42f785c871939a09876c1c8db3d 100644 (file)
@@ -115,8 +115,7 @@ quiet_cmd_vdso = VDSO    $@
                       -T $(filter %.lds,$^) $(filter %.o,$^) && \
                sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@'
 
-VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
-       $(call ld-option, --build-id) -Bsymbolic
+VDSO_LDFLAGS = -shared --hash-style=both --build-id -Bsymbolic
 GCOV_PROFILE := n
 
 #
index 34773395139a8452889fd806eb1576617e6aaff3..8df549138193801b996b950cbd0f97746fd7abbd 100644 (file)
@@ -176,9 +176,8 @@ quiet_cmd_vdso = VDSO    $@
                       -T $(filter %.lds,$^) $(filter %.o,$^) && \
                 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 
-VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
-       $(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \
-       -Bsymbolic
+VDSO_LDFLAGS = -shared --hash-style=both --build-id \
+       $(call ld-option, --eh-frame-hdr) -Bsymbolic
 GCOV_PROFILE := n
 
 quiet_cmd_vdso_and_check = VDSO    $@