mirror-linux/arch/sh
Menglong Dong 35561bab76 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c
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>
2025-09-25 09:57:15 +02:00
..
boards sh updates for v6.16 2025-06-07 10:00:03 -07:00
boot sh: Do not use hyphen in exported variable name 2025-07-26 17:15:41 +02:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs netfilter: conntrack: remove DCCP protocol support 2025-07-03 13:51:39 +02:00
drivers treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
include mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
lib sh: remove duplicate ioread/iowrite helpers 2025-03-11 10:41:18 +01:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm arch, mm: make releasing of memory to page allocator more explicit 2025-03-17 22:06:53 -07:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild sh: Migrate to the generic rule for built-in DTB 2025-02-01 10:43:18 +01:00
Kconfig tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD 2025-07-22 20:15:56 -04:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Do not use hyphen in exported variable name 2025-07-26 17:15:41 +02:00