]> git.ipfire.org Git - people/arne_f/kernel.git/blame - arch/powerpc/kernel/vdso64/Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[people/arne_f/kernel.git] / arch / powerpc / kernel / vdso64 / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2# List of files in the vdso, has to be asm only for now
3
18ad51dd 4obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
1da177e4
LT
5
6# Build rules
7
8150caad 8targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
1da177e4
LT
9obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
10
a15098c9 11GCOV_PROFILE := n
bf76f73c 12UBSAN_SANITIZE := n
a15098c9 13
4108d9ba 14ccflags-y := -shared -fno-common -fno-builtin
15ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
787b393c 16 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
4108d9ba 17asflags-y := -D__VDSO64__ -s
1da177e4
LT
18
19obj-y += vdso64_wrapper.o
20extra-y += vdso64.lds
21CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
22
23# Force dependency (incbin is bad)
24$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
25
26# link rule for the .so file, .lds has to be first
b9a4a0d0 27$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE
1da177e4
LT
28 $(call if_changed,vdso64ld)
29
8150caad
RM
30# strip rule for the .so file
31$(obj)/%.so: OBJCOPYFLAGS := -S
32$(obj)/%.so: $(obj)/%.so.dbg FORCE
33 $(call if_changed,objcopy)
34
1da177e4
LT
35# actual build commands
36quiet_cmd_vdso64ld = VDSO64L $@
b9a4a0d0 37 cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
1da177e4 38
8150caad
RM
39# install commands for the unstripped file
40quiet_cmd_vdso_install = INSTALL $@
41 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
42
43vdso64.so: $(obj)/vdso64.so.dbg
44 @mkdir -p $(MODLIB)/vdso
45 $(call cmd,vdso_install)
1da177e4 46
8150caad 47vdso_install: vdso64.so