usb: dwc3: support for pinctrl state change during system sleep
[linux/fpc-iii.git] / arch / arm64 / kernel / vdso / Makefile
blobf6fe17d88da55d0b212b4d6ffe900f962e1e7bd5
2 # Building a vDSO image for AArch64.
4 # Author: Will Deacon <will.deacon@arm.com>
5 # Heavily based on the vDSO Makefiles for other archs.
8 obj-vdso := gettimeofday.o note.o sigreturn.o
10 # Build rules
11 targets := $(obj-vdso) vdso.so vdso.so.dbg
12 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
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)
18 # Workaround for bare-metal (ELF) toolchains that neglect to pass -shared
19 # down to collect2, resulting in silent corruption of the vDSO image.
20 ccflags-y += -Wl,-shared
22 obj-y += vdso.o
23 extra-y += vdso.lds vdso-offsets.h
24 CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
26 # Force dependency (incbin is bad)
27 $(obj)/vdso.o : $(obj)/vdso.so
29 # Link rule for the .so file, .lds has to be first
30 $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso)
31 $(call if_changed,vdsold)
33 # Strip rule for the .so file
34 $(obj)/%.so: OBJCOPYFLAGS := -S
35 $(obj)/%.so: $(obj)/%.so.dbg FORCE
36 $(call if_changed,objcopy)
38 # Generate VDSO offsets using helper script
39 gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
40 quiet_cmd_vdsosym = VDSOSYM $@
41 define cmd_vdsosym
42 $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ && \
43 cp $@ include/generated/
44 endef
46 $(obj)/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE
47 $(call if_changed,vdsosym)
49 # Assembly rules for the .S files
50 $(obj-vdso): %.o: %.S FORCE
51 $(call if_changed_dep,vdsoas)
53 # Actual build commands
54 quiet_cmd_vdsold = VDSOL $@
55 cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $^ -o $@
56 quiet_cmd_vdsoas = VDSOA $@
57 cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $<
59 # Install commands for the unstripped file
60 quiet_cmd_vdso_install = INSTALL $@
61 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
63 vdso.so: $(obj)/vdso.so.dbg
64 @mkdir -p $(MODLIB)/vdso
65 $(call cmd,vdso_install)
67 vdso_install: vdso.so