diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/Makefile-x86_64 | 2 | ||||
-rw-r--r-- | arch/um/scripts/Makefile.rules | 26 | ||||
-rw-r--r-- | arch/um/sys-i386/Makefile | 17 | ||||
-rw-r--r-- | arch/um/sys-x86_64/Makefile | 28 |
4 files changed, 19 insertions, 54 deletions
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 38df311e75dc..dfd88b652fbe 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -1,7 +1,7 @@ | |||
1 | # Copyright 2003 - 2004 Pathscale, Inc | 1 | # Copyright 2003 - 2004 Pathscale, Inc |
2 | # Released under the GPL | 2 | # Released under the GPL |
3 | 3 | ||
4 | libs-y += arch/um/sys-x86_64/ | 4 | core-y += arch/um/sys-x86_64/ |
5 | START := 0x60000000 | 5 | START := 0x60000000 |
6 | 6 | ||
7 | #We #undef __x86_64__ for kernelspace, not for userspace where | 7 | #We #undef __x86_64__ for kernelspace, not for userspace where |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 2e41cabd3d93..b696b451774c 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -20,25 +20,7 @@ define unprofile | |||
20 | $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) | 20 | $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) |
21 | endef | 21 | endef |
22 | 22 | ||
23 | 23 | ifdef subarch-obj-y | |
24 | # cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If | 24 | obj-y += subarch.o |
25 | # so, it's considered to be a path relative to $(srcdir) rather than | 25 | subarch-y = $(addprefix ../../$(SUBARCH)/,$(subarch-obj-y)) |
26 | # $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from | 26 | endif |
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) | ||
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index f5fd5b0156d0..1c89f4346ec1 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -1,23 +1,16 @@ | |||
1 | obj-y := bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | 1 | obj-y = 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 \ | 2 | ptrace_user.o signal.o sigcontext.o syscalls.o sysrq.o sys_call_table.o |
3 | sys_call_table.o | ||
4 | 3 | ||
5 | obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o | 4 | obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o |
6 | 5 | ||
7 | obj-$(CONFIG_HIGHMEM) += highmem.o | 6 | subarch-obj-y = lib/bitops.o kernel/semaphore.o |
8 | obj-$(CONFIG_MODULES) += module.o | 7 | subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o |
8 | subarch-obj-$(CONFIG_MODULES) += kernel/module.o | ||
9 | 9 | ||
10 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o | 10 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o |
11 | 11 | ||
12 | SYMLINKS = bitops.c semaphore.c highmem.c module.c | ||
13 | |||
14 | include arch/um/scripts/Makefile.rules | 12 | include arch/um/scripts/Makefile.rules |
15 | 13 | ||
16 | bitops.c-dir = lib | ||
17 | semaphore.c-dir = kernel | ||
18 | highmem.c-dir = mm | ||
19 | module.c-dir = kernel | ||
20 | |||
21 | $(obj)/stub_segv.o : _c_flags = $(call unprofile,$(CFLAGS)) | 14 | $(obj)/stub_segv.o : _c_flags = $(call unprofile,$(CFLAGS)) |
22 | 15 | ||
23 | include arch/um/scripts/Makefile.unmap | 16 | include arch/um/scripts/Makefile.unmap |
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index a351091fbd99..fd192119087f 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -4,30 +4,20 @@ | |||
4 | # Licensed under the GPL | 4 | # Licensed under the GPL |
5 | # | 5 | # |
6 | 6 | ||
7 | #XXX: why into lib-y? | 7 | obj-y = bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \ |
8 | lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \ | 8 | sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o ksyms.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 | ||
12 | 9 | ||
13 | obj-y := ksyms.o | 10 | obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o |
14 | obj-$(CONFIG_MODULES) += module.o um_module.o | 11 | obj-$(CONFIG_MODULES) += um_module.o |
15 | 12 | ||
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 | ||
17 | 15 | ||
18 | SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \ | 16 | ldt-y = ../sys-i386/ldt.o |
19 | thunk.S module.c | ||
20 | 17 | ||
21 | include arch/um/scripts/Makefile.rules | 18 | USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o |
22 | 19 | ||
23 | bitops.c-dir = lib | 20 | include arch/um/scripts/Makefile.rules |
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 | ||
31 | 21 | ||
32 | $(obj)/stub_segv.o: _c_flags = $(call unprofile,$(CFLAGS)) | 22 | $(obj)/stub_segv.o: _c_flags = $(call unprofile,$(CFLAGS)) |
33 | 23 | ||