Skip to content

Commit

Permalink
kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masahir0y committed May 26, 2021
1 parent 0d989ac commit d92cc4d
Show file tree
Hide file tree
Showing 24 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 1 addition & 0 deletions arch/alpha/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
3 changes: 0 additions & 3 deletions arch/arc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
1 change: 0 additions & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions arch/csky/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 1 addition & 0 deletions arch/h8300/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 1 addition & 0 deletions arch/hexagon/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 1 addition & 0 deletions arch/ia64/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 0 additions & 1 deletion arch/m68k/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/


Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
3 changes: 0 additions & 3 deletions arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/nds32/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 1 addition & 0 deletions arch/nios2/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
1 change: 0 additions & 1 deletion arch/openrisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ endif

head-y := arch/openrisc/kernel/head.o

core-y += arch/openrisc/
libs-y += $(LIBGCC)

PHONY += vmlinux.bin
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
3 changes: 0 additions & 3 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
3 changes: 0 additions & 3 deletions arch/s390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
1 change: 1 addition & 0 deletions arch/sh/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
3 changes: 0 additions & 3 deletions arch/sparc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
1 change: 1 addition & 0 deletions arch/um/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only
3 changes: 0 additions & 3 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0-only

0 comments on commit d92cc4d

Please sign in to comment.