Re: linux-next: build failure after merge of the kbuild tree

From: Yonghong Song

Date: Mon Mar 16 2026 - 12:19:25 EST




On 3/16/26 9:02 AM, Nicolas Schier wrote:
Hi Mark,

On Mon, Mar 16, 2026 at 02:18:45PM +0000, Mark Brown wrote:
Hi all,

After merging the kbuild tree, today's linux-next build (arm64 perf)
failed like this:

Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libpython: [ on ]
... libcapstone: [ on ]
... llvm-perf: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... libopenssl: [ on ]
... rust: [ on ]

Makefile:2254: *** extraneous 'endif'. Stop.
Makefile:2254: *** extraneous 'endif'. Stop.
PERF_VERSION = .gbc1f864a1976
52.34user 4.91system 0:56.88elapsed 100%CPU (0avgtext+0avgdata 140840maxresident)k
0inputs+0outputs (0major+1379795minor)pagefaults 0swaps
Building: arm64 allnoconfig
Makefile:2254: *** extraneous 'endif'. Stop.

Presumably caused by commit

6a76b3c06a1d3 (kbuild: Reduce the number of compiler-generated suffixes for clang thin-lto build)

though I don't immediately see how. I have used the version from
next-20260313 instead.
thanks for the report. Unfortunately, I cannot reproduce that anyhow;
but I pushed to kbuild/kbuild-for-next at 12:36 UTC, might that have
been a bad point in time? Do you have your merge somewhere around where
I can fetch it for investigation?

I guess it probably due to my bad suggestions (sorry I should have tested before
sending out).

else
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
+if CONFIG_LTO_CLANG_THIN
+KBUILD_LDFLAGS += $(call ld-option,--lto-whole-program-visibility
-mllvm -always-rename-promoted-locals=false)
+endif
endifIt should be else
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
+ifdef CONFIG_LTO_CLANG_THIN
+KBUILD_LDFLAGS += $(call ld-option,--lto-whole-program-visibility
-mllvm -always-rename-promoted-locals=false)
+endif
endif


Kind regards,
Nicolas