[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190712120618.6207-1-vincenzo.frascino@arm.com>
Date: Fri, 12 Jul 2019 13:06:18 +0100
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Cc: catalin.marinas@....com, will.deacon@....com, arnd@...db.de,
linux@...linux.org.uk, daniel.lezcano@...aro.org,
tglx@...utronix.de, salyzyn@...roid.com, pcc@...gle.com,
0x7f454c46@...il.com, linux@...musvillemoes.dk,
huw@...eweavers.com, sthotton@...vell.com, andre.przywara@....com,
luto@...nel.org, john.stultz@...aro.org, naohiro.aota@....com,
yamada.masahiro@...ionext.com, Will Deacon <will@...nel.org>
Subject: [PATCH] arm64: compat: Fix flip/flop vdso building bug
Running "make" on an already compiled kernel tree will rebuild the
vdso32 library even if this has not been modified.
$ make
GEN Makefile
Using linux as source for kernel
CALL linux/scripts/atomic/check-atomics.sh
CALL linux/scripts/checksyscalls.sh
VDSOCHK arch/arm64/kernel/vdso32/vdso.so.raw
VDSOSYM include/generated/vdso32-offsets.h
CHK include/generated/compile.h
CC arch/arm64/kernel/signal.o
CC arch/arm64/kernel/vdso.o
CC arch/arm64/kernel/signal32.o
VDSOL arch/arm64/kernel/vdso32/vdso.so.raw
MUNGE arch/arm64/kernel/vdso32/vdso.so.dbg
OBJCOPY arch/arm64/kernel/vdso32/vdso.so
AS arch/arm64/kernel/vdso32/vdso.o
AR arch/arm64/kernel/vdso32/built-in.a
AR arch/arm64/kernel/built-in.a
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.a
LD vmlinux.o
MODPOST vmlinux.o
The issue is generated by the fact that "if_changed" is called twice
in a single target.
Fix the build bug merging the two commands into a single function.
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will@...nel.org>
Fixes: a7f71a2c8903 ("arm64: compat: Add vDSO")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
---
arch/arm64/kernel/vdso32/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 288c14d30b45..fb572b6f1bf5 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -144,8 +144,7 @@ $(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/$(munge) FORCE
# Link rule for the .so file, .lds has to be first
$(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE
- $(call if_changed,vdsold)
- $(call if_changed,vdso_check)
+ $(call if_changed,vdsold_and_vdso_check)
# Compilation rules for the vDSO sources
$(c-obj-vdso): %.o: %.c FORCE
@@ -156,6 +155,9 @@ $(asm-obj-vdso): %.o: %.S FORCE
$(call if_changed_dep,vdsoas)
# Actual build commands
+quiet_cmd_vdsold_and_vdso_check = LD $@
+ cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check)
+
quiet_cmd_vdsold = VDSOL $@
cmd_vdsold = $(COMPATCC) -Wp,-MD,$(depfile) $(VDSO_LDFLAGS) \
-Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
--
2.22.0
Powered by blists - more mailing lists