aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 6430a6383853..c58b657f0097 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -47,13 +47,16 @@ ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include
47endif 47endif
48SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) 48SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
49 49
50# -Dvmap=kernel_vmap affects everything, and prevents anything from 50# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
51# referencing the libpcap.o symbol so named. 51# named - it's a common symbol in libpcap, so we get a binary which crashes.
52# 52#
53# Same things for in6addr_loopback - found in libc. 53# Same things for in6addr_loopback and mktime - found in libc. For these two we
54# only get link-time error, luckily.
55#
56# These apply to USER_CFLAGS to.
54 57
55CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ 58CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
56 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ 59 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
57 -Din6addr_loopback=kernel_in6addr_loopback 60 -Din6addr_loopback=kernel_in6addr_loopback
58 61
59AFLAGS += $(ARCH_INCLUDE) 62AFLAGS += $(ARCH_INCLUDE)
@@ -66,6 +69,7 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
66# kernel_errno to separate them from the libc errno. This allows -fno-common 69# kernel_errno to separate them from the libc errno. This allows -fno-common
67# in CFLAGS. Otherwise, it would cause ld to complain about the two different 70# in CFLAGS. Otherwise, it would cause ld to complain about the two different
68# errnos. 71# errnos.
72# These apply to kernelspace only.
69 73
70CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ 74CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
71 -Dmktime=kernel_mktime 75 -Dmktime=kernel_mktime
@@ -168,10 +172,13 @@ else
168 $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch 172 $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch
169endif 173endif
170 174
171$(ARCH_DIR)/include/sysdep: 175$(objtree)/$(ARCH_DIR)/include:
176 @echo ' MKDIR $@'
177 $(Q)mkdir -p $@
178
179$(ARCH_DIR)/include/sysdep: $(objtree)/$(ARCH_DIR)/include
172 @echo ' SYMLINK $@' 180 @echo ' SYMLINK $@'
173ifneq ($(KBUILD_SRC),) 181ifneq ($(KBUILD_SRC),)
174 $(Q)mkdir -p $(ARCH_DIR)/include
175 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep 182 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep
176else 183else
177 $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep 184 $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep
@@ -214,7 +221,7 @@ $(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/user-offsets.s
214 221
215CLEAN_FILES += $(ARCH_DIR)/user-offsets.s 222CLEAN_FILES += $(ARCH_DIR)/user-offsets.s
216 223
217$(ARCH_DIR)/include/kern_constants.h: 224$(ARCH_DIR)/include/kern_constants.h: $(objtree)/$(ARCH_DIR)/include
218 @echo ' SYMLINK $@' 225 @echo ' SYMLINK $@'
219 $(Q) ln -sf ../../../include/asm-um/asm-offsets.h $@ 226 $(Q) ln -sf ../../../include/asm-um/asm-offsets.h $@
220 227