Skip to contentSkip to conversation

powerpc: vdso: drop unnecessary cc-ldoption

PATCH Applied Nick Desaulniers 3 participants 4 messages Apr 23, 2019 – May 3, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: vdso: drop unnecessary cc-ldoption

Towards the goal of removing cc-ldoption, it seems that --hash-style= was added to binutils 2.17.50.0.2 in 2006. The minimal required version of binutils for the kernel according to Documentation/process/changes.rst is 2.20.

---
 arch/powerpc/kernel/vdso32/Makefile | 5 ++---
 arch/powerpc/kernel/vdso64/Makefile | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/kernel/vdso32/Makefile +2 -3
index ce199f6e4256..06f54d947057 100644
@@ -26,9 +26,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
-		$(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+	-Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO32__ -s
 
 obj-y += vdso32_wrapper.o
arch/powerpc/kernel/vdso64/Makefile +2 -3
index 28e7d112aa2f..32ebb3522ea1 100644
@@ -12,9 +12,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
-		$(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+	-Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO64__ -s
 
 obj-y += vdso64_wrapper.o
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#1 lore raw
Quoted 48 lines · Nick Desaulniers

Towards the goal of removing cc-ldoption, it seems that --hash-style= was added to binutils 2.17.50.0.2 in 2006. The minimal required version of binutils for the kernel according to Documentation/process/changes.rst is 2.20.

---
 arch/powerpc/kernel/vdso32/Makefile | 5 ++---
 arch/powerpc/kernel/vdso64/Makefile | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/kernel/vdso32/Makefile +2 -3
index ce199f6e4256..06f54d947057 100644
@@ -26,9 +26,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
-               $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+       -Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO32__ -s
 
 obj-y += vdso32_wrapper.o
arch/powerpc/kernel/vdso64/Makefile +2 -4
index 28e7d112aa2f..32ebb3522ea1 100644
@@ -12,9 +12,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
-               $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+       -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO64__ -s
 
 obj-y += vdso64_wrapper.o
--
Quoted 2 lines

2.21.0.593.g511ec345e18-goog

bumping for review

Signature · 2 lines
Thanks,
~Nick Desaulniers
reviewer Reviewed-by
#2 lore raw

Nick Desaulniers's on May 1, 2019 6:25 am:

Quoted 48 lines
Quoted 46 lines · Nick Desaulniers

Towards the goal of removing cc-ldoption, it seems that --hash-style= was added to binutils 2.17.50.0.2 in 2006. The minimal required version of binutils for the kernel according to Documentation/process/changes.rst is 2.20.

---
 arch/powerpc/kernel/vdso32/Makefile | 5 ++---
 arch/powerpc/kernel/vdso64/Makefile | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/kernel/vdso32/Makefile +2 -3
index ce199f6e4256..06f54d947057 100644
@@ -26,9 +26,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
-               $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+       -Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO32__ -s
 
 obj-y += vdso32_wrapper.o
arch/powerpc/kernel/vdso64/Makefile +2 -3
index 28e7d112aa2f..32ebb3522ea1 100644
@@ -12,9 +12,8 @@ GCOV_PROFILE := n
 KCOV_INSTRUMENT := n
 UBSAN_SANITIZE := n
 
-ccflags-y := -shared -fno-common -fno-builtin
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
-               $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
+       -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO64__ -s
 
Quoted 6 lines
Quoted 4 lines
arch/powerpc/kernel/vdso64/Makefile +0 -1
 obj-y += vdso64_wrapper.o
--

2.21.0.593.g511ec345e18-goog

bumping for review

This looks like a good cleanup.

#3 lore raw
In reply to Nick Desaulniers
Quoted 10 lines · Nick Desaulniers

Towards the goal of removing cc-ldoption, it seems that --hash-style= was added to binutils 2.17.50.0.2 in 2006. The minimal required version of binutils for the kernel according to Documentation/process/changes.rst is 2.20.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/33dda8c32714c1a8f318450af4d1f9f1

cheers