sparc,sparc64: unify arch Makefile
Subsystems (2)
PATCH 4/6 sparc,sparc64: unify arch Makefile
Unifying arch Makefile is a preparation for the unification of kernel/ as asm-offset.c lives here.
The unification required a small update of the top-level Makefile where sparc support got simpler.
With this update the sparc64 Kconfig file are no longer used and is deleted.
And the asm-offset.c file from sparc/kernel is now used so the sparc64 version is deleted.
The defconfig files were both copied to sparc/configs and logic was added to seelct the right one.
The content of the sparc64/Makefile is more or less verbatim copied to the sparc/Makefile. Further unification is possible after finalizing the other unification work.
Signed-off-by Sam Ravnborg <[email protected]>
---
Makefile | 9 ++--
arch/sparc/Kconfig | 5 ++
arch/sparc/Makefile | 52 +++++++++++++++++++-
.../sparc/{defconfig => configs/sparc32_defconfig} | 0
.../defconfig => sparc/configs/sparc64_defconfig} | 0
arch/sparc/kernel/asm-offsets.c | 6 ++
arch/sparc64/Kconfig | 1 -
arch/sparc64/Makefile | 48 ------------------
arch/sparc64/kernel/asm-offsets.c | 1 -
9 files changed, 67 insertions(+), 55 deletions(-)
rename arch/sparc/{defconfig => configs/sparc32_defconfig} (100%)
rename arch/{sparc64/defconfig => sparc/configs/sparc64_defconfig} (100%)
delete mode 100644 arch/sparc64/Kconfig
delete mode 100644 arch/sparc64/Makefile
delete mode 100644 arch/sparc64/kernel/asm-offsets.cMakefile +5 -4
@@ -205,13 +205,14 @@ ifeq ($(ARCH),x86_64) SRCARCH := x86 endif -# Where to locate arch specific headers +# Additional ARCH settings for sparc ifeq ($(ARCH),sparc64) - hdr-arch := sparc -else - hdr-arch := $(SRCARCH) + SRCARCH := sparc endif +# Where to locate arch specific headers +hdr-arch := $(SRCARCH) + KCONFIG_CONFIG ?= .config # SHELL used by kbuild
arch/sparc/Kconfig +5 -0
@@ -41,6 +41,11 @@ config SPARC64 select RTC_DRV_SUN4V select RTC_DRV_STARFIRE +config ARCH_DEFCONFIG + string + default "arch/sparc/configs/sparc32_defconfig" if SPARC32 + default "arch/sparc/configs/sparc64_defconfig" if SPARC64 + config 64BIT def_bool y if SPARC64
arch/sparc/Makefile +51 -1
71 lines not on this page · raw message
arch/sparc/configs/sparc32_defconfig renamed from arch/sparc/defconfig +0 -0
arch/sparc/configs/sparc64_defconfig renamed from arch/sparc64/defconfig +0 -0
arch/sparc/kernel/asm-offsets.c +6 -0
@@ -14,6 +14,8 @@// #include <linux/mm.h> #include <linux/kbuild.h> +#ifdef CONFIG_SPARC32 +int foo (void ) {DEFINE (AOFF_task_thread, offsetof(struct task_struct , thread));
@@ -26,3 +28,7 @@ int foo(void)/* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ return 0; } + +#else +/* Nothing for sparc64 (yet) */ +#endif
arch/sparc64/Kconfig deleted +0 -1
@@ -1 +0,0 @@ -source arch/sparc/Kconfig
arch/sparc64/Makefile deleted +0 -48
48 lines not on this page · raw message
arch/sparc64/kernel/asm-offsets.c deleted +0 -1
@@ -1 +0,0 @@ -/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */
Signature · 1 line
1.5.6.GIT