@@ -21,14 +21,14 @@ core-y += $(ARCH_DIR)/kernel/ \
2121# Have to precede the include because the included Makefiles reference them.
2222SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \
2323 module.h vm-flags.h elf.h host_ldt.h
24- SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS ) ,include/asm-um /$(header ) )
24+ SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS ) ,$( ARCH_DIR ) / include/asm/$(header ) )
2525
2626# XXX: The "os" symlink is only used by arch/um/include/os.h, which includes
2727# ../os/include/file.h
2828#
2929# These are cleaned up during mrproper. Please DO NOT fix it again, this is
3030# the Correct Thing(tm) to do!
31- ARCH_SYMLINKS = include/asm-um /arch $(ARCH_DIR ) /include/shared/sysdep $(ARCH_DIR ) /os \
31+ ARCH_SYMLINKS = $( ARCH_DIR ) / include/asm/arch $(ARCH_DIR ) /include/shared/sysdep $(ARCH_DIR ) /os \
3232 $(SYMLINK_HEADERS ) $(ARCH_DIR ) /include/shared/uml-config.h
3333
3434MODE_INCLUDE += -I$(srctree ) /$(ARCH_DIR ) /include/shared/skas
@@ -38,6 +38,7 @@ include $(srctree)/$(ARCH_DIR)/Makefile-skas
3838ARCH_INCLUDE := -I$(ARCH_DIR ) /include/shared
3939ifneq ($(KBUILD_SRC ) ,)
4040ARCH_INCLUDE += -I$(srctree ) /$(ARCH_DIR ) /include/shared
41+ KBUILD_CPPFLAGS += -I$(ARCH_DIR ) /include # for arch symlink
4142endif
4243SYS_DIR := $(ARCH_DIR ) /include/shared/sysdep-$(SUBARCH )
4344
@@ -145,19 +146,19 @@ archclean:
145146$(SYMLINK_HEADERS ) :
146147 @echo ' SYMLINK $@'
147148ifneq ($(KBUILD_SRC ) ,)
148- $(Q)mkdir -p $(objtree)/include/asm-um
149- $(Q)ln -fsn $(srctree)/include/asm-um /$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
149+ $(Q)mkdir -p $(objtree)/$(ARCH_DIR)/ include/asm
150+ $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/ include/asm/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
150151else
151152 $(Q)ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
152153endif
153154
154- include/asm-um /arch :
155+ $( ARCH_DIR ) / include/asm/arch :
155156 @echo ' SYMLINK $@'
156157ifneq ($(KBUILD_SRC ) ,)
157- $(Q)mkdir -p $(objtree)/include/asm-um
158+ $(Q)mkdir -p $(objtree)/$(ARCH_DIR)/ include/asm
158159 $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) $@
159160else
160- $(Q)ln -fsn ../asm-$(HEADER_ARCH) $@
161+ $(Q)ln -fsn ../../../../include/ asm-$(HEADER_ARCH) $@
161162endif
162163
163164$(objtree ) /$(ARCH_DIR ) /include/shared :
@@ -209,6 +210,6 @@ $(ARCH_DIR)/include/shared/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-off
209210
210211$(ARCH_DIR ) /include/shared/kern_constants.h : $(objtree ) /$(ARCH_DIR ) /include/shared
211212 @echo ' SYMLINK $@'
212- $(Q ) ln -sf ../../../../include/asm-um /asm-offsets.h $@
213+ $(Q ) ln -sf ../../../../include/asm/asm-offsets.h $@
213214
214215export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH
0 commit comments