diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-22 01:33:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-22 19:02:05 -0400 |
commit | 3c2b2d9408b11022614bf656ae56c8fc12001ecc (patch) | |
tree | 6093ef88da7df280585c353a2ce2d1879f468ab3 | |
parent | 5615edcca99a0ceb47940fb8e89d1f72bc35398b (diff) |
sparc: Really use linker with LDFLAGS.
Rather than funneling through CC.
Also, use --hash-style=both just like other VDSO architectures and
glibc do.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/vdso/Makefile | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 3b0d287311c2..a9e3a4f633a7 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile | |||
@@ -33,10 +33,8 @@ targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so) | |||
33 | 33 | ||
34 | CPPFLAGS_vdso.lds += -P -C | 34 | CPPFLAGS_vdso.lds += -P -C |
35 | 35 | ||
36 | VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ | 36 | VDSO_LDFLAGS_vdso.lds = -m elf64_sparc -soname linux-vdso.so.1 --no-undefined \ |
37 | -Wl,--no-undefined \ | 37 | -z max-page-size=8192 -z common-page-size=8192 |
38 | -Wl,-z,max-page-size=8192 -Wl,-z,common-page-size=8192 \ | ||
39 | $(DISABLE_LTO) | ||
40 | 38 | ||
41 | $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE | 39 | $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE |
42 | $(call if_changed,vdso) | 40 | $(call if_changed,vdso) |
@@ -74,7 +72,7 @@ $(obj)/%.so: $(obj)/%.so.dbg | |||
74 | $(call if_changed,objcopy) | 72 | $(call if_changed,objcopy) |
75 | 73 | ||
76 | CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) | 74 | CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) |
77 | VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf32_sparc,-soname=linux-gate.so.1 | 75 | VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1 |
78 | 76 | ||
79 | #This makes sure the $(obj) subdirectory exists even though vdso32/ | 77 | #This makes sure the $(obj) subdirectory exists even though vdso32/ |
80 | #is not a kbuild sub-make subdirectory | 78 | #is not a kbuild sub-make subdirectory |
@@ -111,12 +109,12 @@ $(obj)/vdso32.so.dbg: FORCE \ | |||
111 | # The DSO images are built using a special linker script. | 109 | # The DSO images are built using a special linker script. |
112 | # | 110 | # |
113 | quiet_cmd_vdso = VDSO $@ | 111 | quiet_cmd_vdso = VDSO $@ |
114 | cmd_vdso = $(CC) -nostdlib -o $@ \ | 112 | cmd_vdso = $(LD) -nostdlib -o $@ \ |
115 | $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ | 113 | $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ |
116 | -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) | 114 | -T $(filter %.lds,$^) $(filter %.o,$^) |
117 | 115 | ||
118 | VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \ | 116 | VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \ |
119 | $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic | 117 | $(call ld-option, --build-id) -Bsymbolic |
120 | GCOV_PROFILE := n | 118 | GCOV_PROFILE := n |
121 | 119 | ||
122 | # | 120 | # |