3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-01 07:42:18 +00:00
Brooklyn/arch/powerpc/kernel/vdso64/Makefile

48 lines
1.3 KiB
Makefile
Raw Normal View History

2021-05-26 19:09:36 +00:00
# SPDX-License-Identifier: GPL-2.0
# List of files in the vdso, has to be asm only for now
obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
# Build rules
2021-09-23 16:59:15 +00:00
targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
2021-05-26 19:09:36 +00:00
obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
UBSAN_SANITIZE := n
ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
-Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
asflags-y := -D__VDSO64__ -s
2021-09-23 16:59:15 +00:00
obj-y += vdso64_wrapper.o
2021-05-26 19:09:36 +00:00
targets += vdso64.lds
CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
2021-09-23 16:59:15 +00:00
# Force dependency (incbin is bad)
$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
2021-05-26 19:09:36 +00:00
2021-09-23 16:59:15 +00:00
# link rule for the .so file, .lds has to be first
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE
$(call if_changed,vdso64ld)
2021-05-26 19:09:36 +00:00
2021-09-23 16:59:15 +00:00
# strip rule for the .so file
$(obj)/%.so: OBJCOPYFLAGS := -S
$(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy)
2021-05-26 19:09:36 +00:00
# actual build commands
2021-09-23 16:59:15 +00:00
quiet_cmd_vdso64ld = VDSO64L $@
cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
# install commands for the unstripped file
quiet_cmd_vdso_install = INSTALL $@
cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
vdso64.so: $(obj)/vdso64.so.dbg
@mkdir -p $(MODLIB)/vdso
$(call cmd,vdso_install)
vdso_install: vdso64.so