aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 6a7a9f43cdef..eb4ac403bd93 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -51,11 +51,6 @@ MRPROPER_DIRS += $(ARCH_DIR)/include2
51endif 51endif
52SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) 52SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
53 53
54include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
55
56core-y += $(SUBARCH_CORE)
57libs-y += $(SUBARCH_LIBS)
58
59# -Dvmap=kernel_vmap affects everything, and prevents anything from 54# -Dvmap=kernel_vmap affects everything, and prevents anything from
60# referencing the libpcap.o symbol so named. 55# referencing the libpcap.o symbol so named.
61 56
@@ -64,7 +59,7 @@ CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
64 59
65USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) 60USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
66USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ 61USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
67 $(MODE_INCLUDE) $(ARCH_USER_CFLAGS) 62 $(MODE_INCLUDE)
68 63
69# -Derrno=kernel_errno - This turns all kernel references to errno into 64# -Derrno=kernel_errno - This turns all kernel references to errno into
70# kernel_errno to separate them from the libc errno. This allows -fno-common 65# kernel_errno to separate them from the libc errno. This allows -fno-common
@@ -74,6 +69,8 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
74CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask 69CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask
75CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 70CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
76 71
72include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
73
77#This will adjust *FLAGS accordingly to the platform. 74#This will adjust *FLAGS accordingly to the platform.
78include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) 75include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
79 76
@@ -132,7 +129,7 @@ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \
132#The wrappers will select whether using "malloc" or the kernel allocator. 129#The wrappers will select whether using "malloc" or the kernel allocator.
133LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc 130LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
134 131
135CFLAGS_vmlinux = $(LINK-y) $(LINK_WRAPS) 132CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS)
136define cmd_vmlinux__ 133define cmd_vmlinux__
137 $(CC) $(CFLAGS_vmlinux) -o $@ \ 134 $(CC) $(CFLAGS_vmlinux) -o $@ \
138 -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \ 135 -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \