summaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-07 18:11:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-07 18:11:12 -0400
commit98ced886dd79a7028d203ed8adea8452bbfb47b6 (patch)
tree0bf36116d2866d63dc5024afe8b6493a3217531e /arch/tile
parent16ffc4c39415e62c1d027d1bc59ee28e267d59f2 (diff)
parent42317ea79d9af0a83b6cfdfe43c27a91d468bfb1 (diff)
Merge tag 'kbuild-thinar-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild thin archives updates from Masahiro Yamada: "Thin archives migration by Nicholas Piggin. THIN_ARCHIVES has been available for a while as an optional feature only for PowerPC architecture, but we do not need two different intermediate-artifact schemes. Using thin archives instead of conventional incremental linking has various advantages: - save disk space for builds - speed-up building a little - fix some link issues (for example, allyesconfig on ARM) due to more flexibility for the final linking - work better with dead code elimination we are planning As discussed before, this migration has been done unconditionally so that any problems caused by this will show up with "git bisect". With testing with 0-day and linux-next, some architectures actually showed up problems, but they were trivial and all fixed now" * tag 'kbuild-thinar-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: tile: remove unneeded extra-y in Makefile kbuild: thin archives make default for all archs x86/um: thin archives build fix tile: thin archives fix linking ia64: thin archives fix linking sh: thin archives fix linking kbuild: handle libs-y archives separately from built-in.o archives kbuild: thin archives use P option to ar kbuild: thin archives final link close --whole-archives option ia64: remove unneeded extra-y in Makefile.gate tile: fix dependency and .*.cmd inclusion for incremental build sparc64: Use indirect calls in hamming weight stubs
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/vdso/Makefile26
1 files changed, 12 insertions, 14 deletions
diff --git a/arch/tile/kernel/vdso/Makefile b/arch/tile/kernel/vdso/Makefile
index c54fff37b5ff..71d5f5d71f79 100644
--- a/arch/tile/kernel/vdso/Makefile
+++ b/arch/tile/kernel/vdso/Makefile
@@ -5,15 +5,14 @@ vdso-syms = rt_sigreturn gettimeofday
5obj-vdso = $(patsubst %, v%.o, $(vdso-syms)) 5obj-vdso = $(patsubst %, v%.o, $(vdso-syms))
6 6
7# Build rules 7# Build rules
8targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds 8targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds vdso-dummy.o
9obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) 9obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
10 10
11# vdso32 is only for tilegx -m32 compat task. 11# vdso32 is only for tilegx -m32 compat task.
12VDSO32-$(CONFIG_COMPAT) := y 12VDSO32-$(CONFIG_COMPAT) := y
13 13
14obj-y += vdso.o 14obj-y += vdso.o vdso-syms.o
15obj-$(VDSO32-y) += vdso32.o 15obj-$(VDSO32-y) += vdso32.o
16extra-y += vdso.lds
17CPPFLAGS_vdso.lds += -P -C -U$(ARCH) 16CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
18 17
19# vDSO code runs in userspace and -pg doesn't help with profiling anyway. 18# vDSO code runs in userspace and -pg doesn't help with profiling anyway.
@@ -42,23 +41,22 @@ $(obj)/vdso.o: $(obj)/vdso.so
42 41
43# link rule for the .so file, .lds has to be first 42# link rule for the .so file, .lds has to be first
44SYSCFLAGS_vdso.so.dbg = $(c_flags) 43SYSCFLAGS_vdso.so.dbg = $(c_flags)
45$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) 44$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
46 $(call if_changed,vdsold) 45 $(call if_changed,vdsold)
47 46
48
49# We also create a special relocatable object that should mirror the symbol 47# We also create a special relocatable object that should mirror the symbol
50# table and layout of the linked DSO. With ld -R we can then refer to 48# table and layout of the linked DSO. With ld -R we can then refer to
51# these symbols in the kernel code rather than hand-coded addresses. 49# these symbols in the kernel code rather than hand-coded addresses.
52extra-y += vdso-syms.o
53$(obj)/built-in.o: $(obj)/vdso-syms.o
54$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
55 50
56SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ 51SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
57 $(call cc-ldoption, -Wl$(comma)--hash-style=both) 52 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
58SYSCFLAGS_vdso_syms.o = -r 53SYSCFLAGS_vdso_dummy.o = -r
59$(obj)/vdso-syms.o: $(src)/vdso.lds $(obj)/vrt_sigreturn.o FORCE 54$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/vrt_sigreturn.o FORCE
60 $(call if_changed,vdsold) 55 $(call if_changed,vdsold)
61 56
57LDFLAGS_vdso-syms.o := -r -R
58$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
59 $(call if_changed,ld)
62 60
63# strip rule for the .so file 61# strip rule for the .so file
64$(obj)/%.so: OBJCOPYFLAGS := -S 62$(obj)/%.so: OBJCOPYFLAGS := -S
@@ -96,17 +94,17 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
96KBUILD_CFLAGS_32 += -m32 -fPIC -shared 94KBUILD_CFLAGS_32 += -m32 -fPIC -shared
97 95
98obj-vdso32 = $(patsubst %, v%32.o, $(vdso-syms)) 96obj-vdso32 = $(patsubst %, v%32.o, $(vdso-syms))
99obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
100 97
101targets += $(obj-vdso32) vdso32.so vdso32.so.dbg 98targets += $(obj-vdso32) vdso32.so vdso32.so.dbg
99obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
102 100
103$(obj-vdso32:%=%): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) 101$(obj-vdso32:%=%): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
104$(obj-vdso32:%=%): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32) 102$(obj-vdso32:%=%): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
105 103
106$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c 104$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c FORCE
107 $(call if_changed_rule,cc_o_c) 105 $(call if_changed_rule,cc_o_c)
108 106
109$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S 107$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S FORCE
110 $(call if_changed,as_o_S) 108 $(call if_changed,as_o_S)
111 109
112# Force dependency 110# Force dependency
@@ -114,5 +112,5 @@ $(obj)/vdso32.o: $(obj)/vdso32.so
114 112
115SYSCFLAGS_vdso32.so.dbg = -m32 -shared -s -Wl,-soname=linux-vdso32.so.1 \ 113SYSCFLAGS_vdso32.so.dbg = -m32 -shared -s -Wl,-soname=linux-vdso32.so.1 \
116 $(call cc-ldoption, -Wl$(comma)--hash-style=both) 114 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
117$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) 115$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) FORCE
118 $(call if_changed,vdsold) 116 $(call if_changed,vdsold)