Skip to content

Commit de2fe5e

Browse files
Al ViroLinus Torvalds
authored andcommitted
[PATCH] uml: eliminate symlinks to host arch
kills symlinks in arch/um/sys-* Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent f4c57a7 commit de2fe5e

4 files changed

Lines changed: 19 additions & 54 deletions

File tree

‎arch/um/Makefile-x86_64‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2003 - 2004 Pathscale, Inc
22
# Released under the GPL
33

4-
libs-y += arch/um/sys-x86_64/
4+
core-y += arch/um/sys-x86_64/
55
START := 0x60000000
66

77
#We #undef __x86_64__ for kernelspace, not for userspace where

‎arch/um/scripts/Makefile.rules‎

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,7 @@ define unprofile
2020
$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
2121
endef
2222

23-
24-
# cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If
25-
# so, it's considered to be a path relative to $(srcdir) rather than
26-
# $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from
27-
# arch/um/sys-i386 rather than arch/i386 like the other borrowed files. So,
28-
# it sets $(ldt.c-dir) to /arch/um/sys-i386.
29-
quiet_cmd_make_link = SYMLINK $@
30-
cmd_make_link = rm -f $@; ln -sf $(srctree)$(if $(filter-out /%,$($(notdir $@)-dir)),/arch/$(SUBARCH))/$($(notdir $@)-dir)/$(notdir $@) $@
31-
32-
# this needs to be before the foreach, because targets does not accept
33-
# complete paths like $(obj)/$(f). To make sure this works, use a := assignment
34-
# or we will get $(obj)/$(f) in the "targets" value.
35-
# Also, this forces you to use the := syntax when assigning to targets.
36-
# Otherwise the line below will cause an infinite loop (if you don't know why,
37-
# just do it).
38-
39-
targets := $(targets) $(SYMLINKS)
40-
41-
SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$(f))
42-
43-
$(SYMLINKS): FORCE
44-
$(call if_changed,make_link)
23+
ifdef subarch-obj-y
24+
obj-y += subarch.o
25+
subarch-y = $(addprefix ../../$(SUBARCH)/,$(subarch-obj-y))
26+
endif

‎arch/um/sys-i386/Makefile‎

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
obj-y := bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
2-
ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o \
3-
sys_call_table.o
1+
obj-y = bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
2+
ptrace_user.o signal.o sigcontext.o syscalls.o sysrq.o sys_call_table.o
43

54
obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
65

7-
obj-$(CONFIG_HIGHMEM) += highmem.o
8-
obj-$(CONFIG_MODULES) += module.o
6+
subarch-obj-y = lib/bitops.o kernel/semaphore.o
7+
subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o
8+
subarch-obj-$(CONFIG_MODULES) += kernel/module.o
99

1010
USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o
1111

12-
SYMLINKS = bitops.c semaphore.c highmem.c module.c
13-
1412
include arch/um/scripts/Makefile.rules
1513

16-
bitops.c-dir = lib
17-
semaphore.c-dir = kernel
18-
highmem.c-dir = mm
19-
module.c-dir = kernel
20-
2114
$(obj)/stub_segv.o : _c_flags = $(call unprofile,$(CFLAGS))
2215

2316
include arch/um/scripts/Makefile.unmap

‎arch/um/sys-x86_64/Makefile‎

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,20 @@
44
# Licensed under the GPL
55
#
66

7-
#XXX: why into lib-y?
8-
lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \
9-
ptrace.o ptrace_user.o sigcontext.o signal.o syscalls.o \
10-
syscall_table.o sysrq.o thunk.o
11-
lib-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
7+
obj-y = bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \
8+
sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o ksyms.o
129

13-
obj-y := ksyms.o
14-
obj-$(CONFIG_MODULES) += module.o um_module.o
10+
obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
11+
obj-$(CONFIG_MODULES) += um_module.o
1512

16-
USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o
13+
subarch-obj-y = lib/bitops.o lib/csum-partial.o lib/memcpy.o lib/thunk.o
14+
subarch-obj-$(CONFIG_MODULES) += kernel/module.o
1715

18-
SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \
19-
thunk.S module.c
16+
ldt-y = ../sys-i386/ldt.o
2017

21-
include arch/um/scripts/Makefile.rules
18+
USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o
2219

23-
bitops.c-dir = lib
24-
csum-copy.S-dir = lib
25-
csum-partial.c-dir = lib
26-
csum-wrappers.c-dir = lib
27-
ldt.c-dir = /arch/um/sys-i386
28-
memcpy.S-dir = lib
29-
thunk.S-dir = lib
30-
module.c-dir = kernel
20+
include arch/um/scripts/Makefile.rules
3121

3222
$(obj)/stub_segv.o: _c_flags = $(call unprofile,$(CFLAGS))
3323

0 commit comments

Comments
 (0)