Commit 6752ed90da032af72f2f1fa23d1abf0889b56db0

Authored by Thomas Gleixner
1 parent d7394fe57a

Kbuild: allow arch/xxx to use a different source path

Preparatory patch for the source merge of arch/i386 and arch/x86_64
into arch/x86. This allows to keep the original arch directories as
stubs for the main Makefiles, Kconfigs et. al during the transition
phase while having the code in the new arch/x86 directory.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Showing 2 changed files with 7 additions and 6 deletions Side-by-side Diff

... ... @@ -12,7 +12,7 @@
12 12  
13 13 always := $(offsets-file)
14 14 targets := $(offsets-file)
15   -targets += arch/$(ARCH)/kernel/asm-offsets.s
  15 +targets += arch/$(SRCARCH)/kernel/asm-offsets.s
16 16 clean-files := $(addprefix $(objtree)/,$(targets))
17 17  
18 18 # Default sed regexp - multiline due to syntax constraints
19 19  
... ... @@ -40,11 +40,11 @@
40 40 endef
41 41  
42 42 # We use internal kbuild rules to avoid the "is up to date" message from make
43   -arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
  43 +arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c FORCE
44 44 $(Q)mkdir -p $(dir $@)
45 45 $(call if_changed_dep,cc_s_c)
46 46  
47   -$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
  47 +$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild
48 48 $(Q)mkdir -p $(dir $@)
49 49 $(call cmd,offsets)
50 50  
... ... @@ -186,7 +186,8 @@
186 186 CROSS_COMPILE ?=
187 187  
188 188 # Architecture as present in compile.h
189   -UTS_MACHINE := $(ARCH)
  189 +UTS_MACHINE := $(ARCH)
  190 +SRCARCH := $(ARCH)
190 191  
191 192 KCONFIG_CONFIG ?= .config
192 193  
... ... @@ -322,7 +323,7 @@
322 323 KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
323 324  
324 325 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
325   -export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
  326 +export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
326 327 export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
327 328 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
328 329  
... ... @@ -609,7 +610,7 @@
609 610 vmlinux-init := $(head-y) $(init-y)
610 611 vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
611 612 vmlinux-all := $(vmlinux-init) $(vmlinux-main)
612   -vmlinux-lds := arch/$(ARCH)/kernel/vmlinux.lds
  613 +vmlinux-lds := arch/$(SRCARCH)/kernel/vmlinux.lds
613 614 export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
614 615  
615 616 # Rule to link vmlinux - also used during CONFIG_KALLSYMS