x86_64 clang-20 clang-nightly config lto-full failed - ld.lld: error: linking module flags 'Code Model': IDs have conflicting values: 'i32 1' from vmlinux.a(gdt_idt.o at 1321040), and 'i32 2' from ld-temp.o

From: Naresh Kamboju
Date: Mon Apr 14 2025 - 12:08:10 EST


Regressions on x86_64 config LTO_CLANG_FULL with korg-clang-20 and
clang-nightly on the
Linux next-20250407 and found again on next-20250414 tag

First seen on the next-20250407.
Bad: next-20250407 and next-20250414
Good:next-20250404

* x86_64, Build
- Build/korg-clang-20-lkftconfig-lto-full
- Build/clang-nightly-lkftconfig-lto-full

Regression Analysis:
- New regression? Yes
- Reproducibility? Yes

Build regression: x86_64 clang-20 clang-nightly config lto-full failed

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

## Build log
ld.lld: error: linking module flags 'Code Model': IDs have conflicting
values: 'i32 1'
from vmlinux.a(gdt_idt.o at 1321040), and 'i32 2' from ld-temp.o

Clang-20 versions:
"name": "clang",
"version": "20.1.2",
"version_full": "ClangBuiltLinux clang version 20.1.2
(https://github.com/llvm/llvm-project.git
58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)"

Clang-nightly versions:
"name": "clang",
"version": "21.0.0",
"version_full": "Debian clang version 21.0.0
(++20250402105505+c57b9c233a87-1~exp1~20250402225526.1363)"

## Source
* Kernel version: 6.15.0-rc2
* Git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
* Git sha: b425262c07a6a643ebeed91046e161e20b944164
* Git describe: next-20250414
* Project details:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250414/

## Test
* Test log: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250407/testrun/27929871/suite/build/test/clang-nightly-lkftconfig-lto-full/log
* Test details:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250414/testrun/28114606/suite/build/test/clang-nightly-lkftconfig-lto-full/
* Test history:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250414/testrun/28114606/suite/build/test/clang-nightly-lkftconfig-lto-full/history/
* Test history:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250414/testrun/28114590/suite/build/test/korg-clang-20-lkftconfig-lto-full/history/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2viBgnFQjsmdmrsmASvlyYWisRa/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2viBgnFQjsmdmrsmASvlyYWisRa/config

## Steps to reproduce
# tuxmake --runtime podman --target-arch x86_64 --toolchain korg-clang-20 \
--kconfig defconfig --kconfig-add CONFIG_DEBUG_INFO_REDUCED=y \
--kconfig-add CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y \
--kconfig-add CONFIG_IGB=y \
--kconfig-add CONFIG_LTO_CLANG_FULL=y LLVM=1 LLVM_IAS=1

--
Linaro LKFT
https://lkft.linaro.org