linux/arch/sparc
Menglong Dong bd0a905c22 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c
[ Upstream commit 35561bab76 ]

The include/generated/asm-offsets.h is generated in Kbuild during
compiling from arch/SRCARCH/kernel/asm-offsets.c. When we want to
generate another similar offset header file, circular dependency can
happen.

For example, we want to generate a offset file include/generated/test.h,
which is included in include/sched/sched.h. If we generate asm-offsets.h
first, it will fail, as include/sched/sched.h is included in asm-offsets.c
and include/generated/test.h doesn't exist; If we generate test.h first,
it can't success neither, as include/generated/asm-offsets.h is included
by it.

In x86_64, the macro COMPILE_OFFSETS is used to avoid such circular
dependency. We can generate asm-offsets.h first, and if the
COMPILE_OFFSETS is defined, we don't include the "generated/test.h".

And we define the macro COMPILE_OFFSETS for all the asm-offsets.c for this
purpose.

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-02 22:18:04 +09:00
..
boot kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
configs crypto: tcrypt - rename CRYPTO_TEST to CRYPTO_BENCHMARK 2025-05-12 13:32:53 +08:00
crypto lib/crypto: sparc/sha1: Migrate optimized code into library 2025-07-14 11:11:49 -07:00
include Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:18:04 +09:00
lib sparc: fix accurate exception reporting in copy_{from,to}_user for M7 2025-10-15 12:04:03 +02:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mm sparc64: fix hugetlb for sun4u 2025-10-19 16:37:31 +02:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
power sparc64: Fix prototype warnings in hibernate.c 2024-07-11 15:58:28 +02:00
prom sparc64: Fix prototype warning for prom_get_mmu_ihandle 2024-07-11 15:58:28 +02:00
vdso stackleak: Split KSTACK_ERASE_CFLAGS from GCC_PLUGINS_CFLAGS 2025-07-21 21:40:57 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
Kconfig.debug sparc: select FRAME_POINTER instead of redefining it 2024-02-16 16:50:26 +01:00
Makefile sparc/build: Put usage of -fcall-used* flags behind cc-option 2024-11-16 09:52:56 +01:00