arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 2 Jun 2025 18:12:54 +0000 (03:12 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 7 Jun 2025 05:38:07 +0000 (14:38 +0900)
The extra-y syntax is deprecated. Instead, use always-$(KBUILD_BUILTIN),
which behaves equivalently.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
21 files changed:
arch/alpha/kernel/Makefile
arch/arc/kernel/Makefile
arch/arm/kernel/Makefile
arch/arm64/kernel/Makefile
arch/csky/kernel/Makefile
arch/hexagon/kernel/Makefile
arch/loongarch/kernel/Makefile
arch/m68k/kernel/Makefile
arch/microblaze/kernel/Makefile
arch/mips/kernel/Makefile
arch/nios2/kernel/Makefile
arch/openrisc/kernel/Makefile
arch/parisc/kernel/Makefile
arch/powerpc/kernel/Makefile
arch/riscv/kernel/Makefile
arch/s390/kernel/Makefile
arch/sh/kernel/Makefile
arch/sparc/kernel/Makefile
arch/um/kernel/Makefile
arch/x86/kernel/Makefile
arch/xtensa/kernel/Makefile

index b6c862dff1f647fb891188c125241bbc00a2adc7..187cd8df2fafe71b6ef6a3c3d2430991d2dbd027 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y                := vmlinux.lds
+always-$(KBUILD_BUILTIN)       := vmlinux.lds
 asflags-y      := $(KBUILD_CFLAGS)
 ccflags-y      := -Wno-sign-compare
 
index 95fbf9364c6734a8f730befa272ebac0e2ab54a6..fa94fff02419b3fb4615cb1304419f43e1ff874c 100644 (file)
@@ -26,4 +26,4 @@ ifdef CONFIG_ISA_ARCOMPACT
 CFLAGS_fpu.o   += -mdpfp
 endif
 
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
index b3333d070390a8ff366a306931614b1b260647bd..afc9de7ef9a1adf8582399c98c5d79388248f824 100644 (file)
@@ -104,4 +104,4 @@ obj-$(CONFIG_HAVE_ARM_SMCCC)        += smccc-call.o
 
 obj-$(CONFIG_GENERIC_CPU_VULNERABILITIES) += spectre.o
 
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
index 71c29a2a2f190f70a101b6ff7e82c14e3c3cb994..2920b0a51403787562476e3c6abc9ab0a84248c0 100644 (file)
@@ -78,7 +78,7 @@ $(obj)/vdso32-wrap.o: $(obj)/vdso32/vdso.so
 
 obj-y                                  += probes/
 obj-y                                  += head.o
-extra-y                                        += vmlinux.lds
+always-$(KBUILD_BUILTIN)               += vmlinux.lds
 
 ifeq ($(CONFIG_DEBUG_EFI),y)
 AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
index de1c3472e8f07afe0a025ad8cd3996d7ffdfaa84..a406a4ac237867211940904637305645fb0f2a30 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
 
 obj-y += head.o entry.o atomic.o signal.o traps.o irq.o time.o vdso.o vdso/
 obj-y += power.o syscall.o syscall_table.o setup.o
index 3fdf937eb572e23f415aeb57d5e481335157d58d..8e0fb4a623153df301646805bb1beda61994d6b3 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
 
 obj-y += head.o
 obj-$(CONFIG_SMP) += smp.o
index f9dcaa60033d95c77ad7b8337b204aa2eccad886..6f5a4574a911d5b7ca68a2e67d52625d4637906f 100644 (file)
@@ -5,7 +5,7 @@
 
 OBJECT_FILES_NON_STANDARD_head.o := y
 
-extra-y                := vmlinux.lds
+always-$(KBUILD_BUILTIN)       := vmlinux.lds
 
 obj-y          += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \
                   traps.o irq.o idle.o process.o dma.o mem.o reset.o switch.o \
index 6c732ed3998b714a4842ee29c977550a61979779..57c1b3e8d60e4ce78c0d618e5b10d20b05452e6f 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y                        += vmlinux.lds
+always-$(KBUILD_BUILTIN)       += vmlinux.lds
 
 obj-$(CONFIG_MMU_MOTOROLA)     := head.o
 obj-$(CONFIG_SUN3)             := sun3-head.o
index 85c4d29ef43e9e3435619b4702c4d96f7c23bbec..241e466e7333b921bb5900f24832e67f9b178200 100644 (file)
@@ -11,7 +11,7 @@ CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_process.o = -pg
 endif
 
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
 
 obj-y += head.o dma.o exceptions.o \
        hw_exception_handler.o irq.o \
index ecf3278a32f7077f29bee3b5f1b535eb8b2c5d06..95a1e674fd6785ea91d3fb2d21bf2a944593ece7 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the Linux/MIPS kernel.
 #
 
-extra-y                := vmlinux.lds
+always-$(KBUILD_BUILTIN)       := vmlinux.lds
 
 obj-y          += head.o branch.o cmpxchg.o elf.o entry.o genex.o idle.o irq.o \
                   process.o prom.o ptrace.o reset.o setup.o signal.o \
index 78a913181fa19dece7f9b746f6a22435315c3b61..4dce965a7b73c68d8522bf022554c60c485c6f64 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the nios2 linux kernel.
 #
 
-extra-y        += vmlinux.lds
+always-$(KBUILD_BUILTIN)       += vmlinux.lds
 
 obj-y  += head.o
 obj-y  += cpuinfo.o
index e4c7d9bdd598d20ddab81793c311258e8d22c8ec..58e6a1b525b7b1bfed82150bd2614432805a94ac 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y        := vmlinux.lds
+always-$(KBUILD_BUILTIN)       := vmlinux.lds
 
 obj-y  := head.o setup.o or32_ksyms.o process.o dma.o \
           traps.o time.o irq.o entry.o ptrace.o signal.o \
index 5ab0467be70ae30ab6921218844ef1b764672a02..d5055ba33722883d4f9ba7e5276144a22b47c30d 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for arch/parisc/kernel
 #
 
-extra-y                := vmlinux.lds
+always-$(KBUILD_BUILTIN)               := vmlinux.lds
 
 obj-y          := head.o cache.o pacache.o setup.o pdt.o traps.o time.o irq.o \
                   syscall.o entry.o sys_parisc.o firmware.o \
index 6ac621155ec3c8fa31a6cb8431fdeec77bcfc2da..4d2daa8e7bca9d3c1e9a46fd3ae860797ac285ce 100644 (file)
@@ -126,7 +126,7 @@ obj-$(CONFIG_PPC_BOOK3S_32) += head_book3s_32.o
 obj-$(CONFIG_44x)              += head_44x.o
 obj-$(CONFIG_PPC_8xx)          += head_8xx.o
 obj-$(CONFIG_PPC_85xx)         += head_85xx.o
-extra-y                                += vmlinux.lds
+always-$(KBUILD_BUILTIN)       += vmlinux.lds
 
 obj-$(CONFIG_RELOCATABLE)      += reloc_$(BITS).o
 
index f7480c9c6f8d73be6652eba46343b9dcf22b8a53..48dcaf2efae812e5ab3f8db332406b7d603071d8 100644 (file)
@@ -43,7 +43,7 @@ CFLAGS_sbi_ecall.o += -D__NO_FORTIFY
 endif
 endif
 
-extra-y += vmlinux.lds
+always-$(KBUILD_BUILTIN) += vmlinux.lds
 
 obj-y  += head.o
 obj-y  += soc.o
index db5f3a3faefbb3637e53c6bdbbe9fca8c660499c..ea5ed6654050941c0d53b2899b639e09fa1c0830 100644 (file)
@@ -46,7 +46,7 @@ obj-y += nospec-branch.o ipl_vmparm.o machine_kexec_reloc.o unwind_bc.o
 obj-y  += smp.o text_amode31.o stacktrace.o abs_lowcore.o facility.o uv.o wti.o
 obj-y  += diag/
 
-extra-y                                += vmlinux.lds
+always-$(KBUILD_BUILTIN)       += vmlinux.lds
 
 obj-$(CONFIG_SYSFS)            += nospec-sysfs.o
 CFLAGS_REMOVE_nospec-branch.o  += $(CC_FLAGS_EXPOLINE)
index 7b453592adafb002b87c7e2eceb908ca7a70b1f1..5ef123bc63f8876ccfec59d7ff1711fd4aa7a0bc 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the Linux/SuperH kernel.
 #
 
-extra-y        := vmlinux.lds
+always-$(KBUILD_BUILTIN)       := vmlinux.lds
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
index 58ea4ef9b622bd18f2160b34762c69b48f3de8c6..2859842d6bb7005f40a6bf8aa6dbd03c7df6637f 100644 (file)
@@ -9,7 +9,7 @@ asflags-y := -ansi
 # Undefine sparc when processing vmlinux.lds - it is used
 # And teach CPP we are doing $(BITS) builds (for this case)
 CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
-extra-y              += vmlinux.lds
+always-$(KBUILD_BUILTIN) += vmlinux.lds
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
index 4df1cd0d20179e09d907e6350b72d25b652d6ad1..821bf4027a232e26970d73f45374f71801fd7542 100644 (file)
@@ -12,7 +12,7 @@ CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START)          \
                         -DELF_ARCH=$(LDS_ELF_ARCH)     \
                         -DELF_FORMAT=$(LDS_ELF_FORMAT) \
                        $(LDS_EXTRA)
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
 
 obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
        physmem.o process.o ptrace.o reboot.o sigio.o \
index 84cfa179802c3901922d578aaca2fbd0bffe0a90..9a30c9816b166edfa6dc1a834c3e1ee2c26a8c7b 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y        += vmlinux.lds
+always-$(KBUILD_BUILTIN)       += vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 
index f28b8e3d717eee087bad79ee1db79bf1d9928507..d3ef0407401f637ba6ed426413886856f5d95fc8 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the Linux/Xtensa kernel.
 #
 
-extra-y := vmlinux.lds
+always-$(KBUILD_BUILTIN) := vmlinux.lds
 
 obj-y := head.o align.o coprocessor.o entry.o irq.o platform.o process.o \
         ptrace.o setup.o signal.o stacktrace.o syscall.o time.o traps.o \