[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zq2qQW62G63dr70s@archie.me>
Date: Sat, 3 Aug 2024 10:55:45 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
x86@...nel.org
Cc: Uros Bizjak <ubizjak@...il.com>, Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Breno Leitao <leitao@...ian.org>,
Kent Overstreet <kent.overstreet@...ux.dev>,
Takashi Iwai <tiwai@...e.de>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>, Stas Sergeev <stsp2@...dex.ru>,
mrwizardwizard <terrym3201@...tonmail.com>
Subject: Fwd: error: 'const_pcpu_hot' causes a section type conflict with
'pcpu_hot' when compiling with -flto
Hi,
mrwizardwizard <terrym3201@...tonmail.com> reported kernel FTBFS on bugzilla
(https://bugzilla.kernel.org/show_bug.cgi?id=219099) when the kernel
is built with LTO:
> Hello,
>
> when compiling linux kernel 6.9-6.10 with -flto
>
> compiler outputs:
>
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot' const_pcpu_hot);
>
He could reproduce the build error on mainline:
>> Can you reproduce above on current mainline (v6.11-rc1)?
>
>
> same messages
>
> mkdir -p /home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1/tools/objtool && make O=/home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1 subdir=tools/objtool --no-print-directory -C objtool
> INSTALL libsubcmd_headers
> CALL scripts/checksyscalls.sh
> CC init/main.o
> AS arch/x86/entry/entry.o
> AS arch/x86/entry/entry_64.o
> arch/x86/entry/entry_64.o: warning: objtool: __switch_to_asm+0x18: stack layout conflict in alternatives: .altinstr_replacement+0x1d
> CC arch/x86/entry/syscall_64.o
> In file included from ./include/asm-generic/percpu.h:7,
> from ./arch/x86/include/asm/percpu.h:616,
> from ./arch/x86/include/asm/current.h:11,
> from ./arch/x86/include/asm/processor.h:17,
> from ./arch/x86/include/asm/timex.h:5,
> from ./include/linux/timex.h:67,
> from ./include/linux/time32.h:13,
> from ./include/linux/time.h:60,
> from ./include/linux/stat.h:19,
> from ./include/linux/module.h:13,
> from init/main.c:17:
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot'
> 42 | const_pcpu_hot);
> | ^~~~~~~~~~~~~~
> ./arch/x86/include/asm/current.h:38:42: note: 'pcpu_hot' was declared here
> 38 | DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot);
> | ^~~~~~~~
> make[3]: *** [scripts/Makefile.build:244: init/main.o] Error 1
> make[2]: *** [scripts/Makefile.build:485: init] Error 2
> make[2]: *** Waiting for unfinished jobs....
> CC arch/x86/entry/common.o
> CC arch/x86/events/core.o
> CC arch/x86/entry/vdso/vma.o
> In file included from ./include/asm-generic/percpu.h:7,
> from ./arch/x86/include/asm/percpu.h:616,
> from ./arch/x86/include/asm/current.h:11,
> from ./include/linux/sched.h:12,
> from ./include/linux/ptrace.h:6,
> from ./include/uapi/asm-generic/bpf_perf_event.h:4,
> from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
> from ./include/uapi/linux/bpf_perf_event.h:11,
> from ./include/linux/perf_event.h:18,
> from arch/x86/events/core.c:15:
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot'
> 42 | const_pcpu_hot);
> | ^~~~~~~~~~~~~~
> ./arch/x86/include/asm/current.h:38:42: note: 'pcpu_hot' was declared here
> 38 | DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot);
> | ^~~~~~~~
> make[4]: *** [scripts/Makefile.build:244: arch/x86/events/core.o] Error 1
> make[3]: *** [scripts/Makefile.build:485: arch/x86/events] Error 2
> make[3]: *** Waiting for unfinished jobs....
> AR arch/x86/entry/vsyscall/built-in.a
> CC arch/x86/entry/vdso/extable.o
> LDS arch/x86/entry/vdso/vdso.lds
> AS arch/x86/entry/vdso/vdso-note.o
> CC arch/x86/entry/vdso/vclock_gettime.o
> CC arch/x86/entry/vdso/vgetcpu.o
> CC arch/x86/entry/vdso/vgetrandom.o
> AS arch/x86/entry/vdso/vgetrandom-chacha.o
> HOSTCC arch/x86/entry/vdso/vdso2c
> VDSO arch/x86/entry/vdso/vdso64.so.dbg
> OBJCOPY arch/x86/entry/vdso/vdso64.so
> VDSO2C arch/x86/entry/vdso/vdso-image-64.c
> CC arch/x86/entry/vdso/vdso-image-64.o
> AR arch/x86/entry/vdso/built-in.a
> AS arch/x86/entry/thunk.o
> AR arch/x86/entry/built-in.a
> make[2]: *** [scripts/Makefile.build:485: arch/x86] Error 2
> make[1]: *** [/home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1/Makefile:1927: .] Error 2
> make: *** [Makefile:224: __sub-make] Error
For the full build log, see Bugzilla link.
Thanks.
--
An old man doll... just what I always wanted! - Clara
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists