kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 12 May 2021 07:57:25 +0000 (16:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 26 May 2021 14:10:37 +0000 (23:10 +0900)
arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
24 files changed:
Makefile
arch/alpha/Kbuild [new file with mode: 0644]
arch/arc/Makefile
arch/arm/Makefile
arch/arm64/Makefile
arch/csky/Kbuild [new file with mode: 0644]
arch/h8300/Kbuild [new file with mode: 0644]
arch/hexagon/Kbuild [new file with mode: 0644]
arch/ia64/Kbuild [new file with mode: 0644]
arch/m68k/Makefile
arch/microblaze/Kbuild [new file with mode: 0644]
arch/mips/Makefile
arch/nds32/Kbuild [new file with mode: 0644]
arch/nios2/Kbuild [new file with mode: 0644]
arch/openrisc/Makefile
arch/parisc/Kbuild [new file with mode: 0644]
arch/powerpc/Makefile
arch/riscv/Makefile
arch/s390/Makefile
arch/sh/Kbuild [new file with mode: 0644]
arch/sparc/Makefile
arch/um/Kbuild [new file with mode: 0644]
arch/x86/Makefile
arch/xtensa/Kbuild [new file with mode: 0644]

index b0bd0ce..4dcfe9c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y         := init/ usr/
+core-y         := init/ usr/ arch/$(SRCARCH)/
 drivers-y      := drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index e47adc9..c0d87ac 100644 (file)
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
 
 head-y         := arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y         += arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y         += arch/arc/boot/dts/
 
index 415c351..173da68 100644 (file)
@@ -252,7 +252,6 @@ endif
 
 export TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y                         += arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y                         += $(machdirs) $(platdirs)
 
index b52481f..be87c65 100644 (file)
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y         += arch/arm64/
 libs-y         := arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index 82620f1..c7710db 100644 (file)
@@ -98,7 +98,6 @@ head-$(CONFIG_SUN3)           := arch/m68k/kernel/sun3-head.o
 head-$(CONFIG_M68000)          := arch/m68k/68000/head.o
 head-$(CONFIG_COLDFIRE)                := arch/m68k/coldfire/head.o
 
-core-y                         += arch/m68k/
 libs-y                         += arch/m68k/lib/
 
 
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index 258234c..4e942b7 100644 (file)
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y                 += arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y                      += arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index 410e7ab..c52de52 100644 (file)
@@ -42,7 +42,6 @@ endif
 
 head-y                 := arch/openrisc/kernel/head.o
 
-core-y         += arch/openrisc/
 libs-y         += $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index 3212d07..af669aa 100644 (file)
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
index 3eb9590..c5f3595 100644 (file)
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
index e443ed9..37b6164 100644 (file)
@@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
 
 head-y         := arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y         += arch/s390/
-
 libs-y         += arch/s390/lib/
 drivers-y      += drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index bee99e6..4e65245 100644 (file)
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
index 3075294..d181a19 100644 (file)
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644 (file)
index 0000000..a4e40e5
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only