forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/nds32/kernel/vdso/Makefile
....@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 #
23 # Building a vDSO image for AArch64.
34 #
....@@ -11,24 +12,22 @@
1112 targets := $(obj-vdso) vdso.so vdso.so.dbg
1213 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
1314
14
-ccflags-y := -shared -fno-common -fno-builtin
15
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
16
- $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
17
-ccflags-y += -fPIC -Wl,-shared -g
15
+ccflags-y := -shared -fno-common -fno-builtin -nostdlib -fPIC -Wl,-shared -g \
16
+ -Wl,-soname=linux-vdso.so.1 -Wl,--hash-style=sysv
1817
1918 # Disable gcov profiling for VDSO code
2019 GCOV_PROFILE := n
2120
2221
2322 obj-y += vdso.o
24
-extra-y += vdso.lds
23
+targets += vdso.lds
2524 CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
2625
2726 # Force dependency
2827 $(obj)/vdso.o : $(obj)/vdso.so
2928
3029 # Link rule for the .so file, .lds has to be first
31
-$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso)
30
+$(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
3231 $(call if_changed,vdsold)
3332
3433
....@@ -40,9 +39,7 @@
4039 # Generate VDSO offsets using helper script
4140 gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
4241 quiet_cmd_vdsosym = VDSOSYM $@
43
-define cmd_vdsosym
44
- $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
45
-endef
42
+ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
4643
4744 include/generated/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE
4845 $(call if_changed,vdsosym)
....@@ -65,7 +62,7 @@
6562
6663 # Actual build commands
6764 quiet_cmd_vdsold = VDSOL $@
68
- cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $^ -o $@
65
+ cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $(real-prereqs) -o $@
6966 quiet_cmd_vdsoas = VDSOA $@
7067 cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $<
7168 quiet_cmd_vdsocc = VDSOA $@