提交 d92cc4d5 编写于 作者: M Masahiro Yamada

kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild

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: NMasahiro Yamada <masahiroy@kernel.org>
上级 0d989ac2
...@@ -658,7 +658,7 @@ endif ...@@ -658,7 +658,7 @@ endif
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
# Objects we will link into vmlinux / subdirs we need to visit # 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-y := drivers/ sound/
drivers-$(CONFIG_SAMPLES) += samples/ drivers-$(CONFIG_SAMPLES) += samples/
drivers-$(CONFIG_NET) += net/ drivers-$(CONFIG_NET) += net/
......
# SPDX-License-Identifier: GPL-2.0-only
...@@ -85,9 +85,6 @@ KBUILD_LDFLAGS += $(ldflags-y) ...@@ -85,9 +85,6 @@ KBUILD_LDFLAGS += $(ldflags-y)
head-y := arch/arc/kernel/head.o 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 # w/o this dtb won't embed into kernel binary
core-y += arch/arc/boot/dts/ core-y += arch/arc/boot/dts/
......
...@@ -252,7 +252,6 @@ endif ...@@ -252,7 +252,6 @@ endif
export TEXT_OFFSET GZFLAGS MMUEXT export TEXT_OFFSET GZFLAGS MMUEXT
core-y += arch/arm/
# If we have a machine-specific directory, then include it in the build. # If we have a machine-specific directory, then include it in the build.
core-y += $(machdirs) $(platdirs) core-y += $(machdirs) $(platdirs)
......
...@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT) ...@@ -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_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
KBUILD_AFLAGS += -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-y := arch/arm64/lib/ $(libs-y)
libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
......
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-License-Identifier: GPL-2.0-only
...@@ -98,7 +98,6 @@ head-$(CONFIG_SUN3) := arch/m68k/kernel/sun3-head.o ...@@ -98,7 +98,6 @@ head-$(CONFIG_SUN3) := arch/m68k/kernel/sun3-head.o
head-$(CONFIG_M68000) := arch/m68k/68000/head.o head-$(CONFIG_M68000) := arch/m68k/68000/head.o
head-$(CONFIG_COLDFIRE) := arch/m68k/coldfire/head.o head-$(CONFIG_COLDFIRE) := arch/m68k/coldfire/head.o
core-y += arch/m68k/
libs-y += arch/m68k/lib/ libs-y += arch/m68k/lib/
......
# SPDX-License-Identifier: GPL-2.0-only
...@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o ...@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
libs-y += arch/mips/lib/ libs-y += arch/mips/lib/
libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/ 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/ drivers-y += arch/mips/crypto/
# suspend and hibernation support # suspend and hibernation support
......
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-License-Identifier: GPL-2.0-only
...@@ -42,7 +42,6 @@ endif ...@@ -42,7 +42,6 @@ endif
head-y := arch/openrisc/kernel/head.o head-y := arch/openrisc/kernel/head.o
core-y += arch/openrisc/
libs-y += $(LIBGCC) libs-y += $(LIBGCC)
PHONY += vmlinux.bin PHONY += vmlinux.bin
......
# SPDX-License-Identifier: GPL-2.0-only
...@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o ...@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
head-$(CONFIG_ALTIVEC) += arch/powerpc/kernel/vector.o head-$(CONFIG_ALTIVEC) += arch/powerpc/kernel/vector.o
head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += arch/powerpc/kernel/prom_init.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 # Default to zImage, override when needed
all: zImage all: zImage
......
...@@ -90,7 +90,6 @@ endif ...@@ -90,7 +90,6 @@ endif
head-y := arch/riscv/kernel/head.o head-y := arch/riscv/kernel/head.o
core-y += arch/riscv/
core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/ core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
libs-y += arch/riscv/lib/ libs-y += arch/riscv/lib/
......
...@@ -128,9 +128,6 @@ OBJCOPYFLAGS := -O binary ...@@ -128,9 +128,6 @@ OBJCOPYFLAGS := -O binary
head-y := arch/s390/kernel/head64.o 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/ libs-y += arch/s390/lib/
drivers-y += drivers/s390/ drivers-y += drivers/s390/
......
# SPDX-License-Identifier: GPL-2.0-only
...@@ -58,9 +58,6 @@ endif ...@@ -58,9 +58,6 @@ endif
head-y := arch/sparc/kernel/head_$(BITS).o 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/prom/
libs-y += arch/sparc/lib/ libs-y += arch/sparc/lib/
......
# SPDX-License-Identifier: GPL-2.0-only
...@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o ...@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
libs-y += arch/x86/lib/ 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-y are linked after core-y
drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/ drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
drivers-$(CONFIG_PCI) += arch/x86/pci/ drivers-$(CONFIG_PCI) += arch/x86/pci/
......
# SPDX-License-Identifier: GPL-2.0-only
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册