aboutsummaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild29
1 files changed, 5 insertions, 24 deletions
diff --git a/Kbuild b/Kbuild
index 4a4c47c38d1d..8637fd14135f 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1,16 +1,9 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2# 2#
3# Kbuild for top-level directory of the kernel 3# Kbuild for top-level directory of the kernel
4# This file takes care of the following:
5# 1) Generate bounds.h
6# 2) Generate timeconst.h
7# 3) Generate asm-offsets.h (may need bounds.h and timeconst.h)
8# 4) Check for missing system calls
9# 5) check atomics headers are up-to-date
10# 6) Generate constants.py (may need bounds.h)
11 4
12##### 5#####
13# 1) Generate bounds.h 6# Generate bounds.h
14 7
15bounds-file := include/generated/bounds.h 8bounds-file := include/generated/bounds.h
16 9
@@ -21,7 +14,7 @@ $(bounds-file): kernel/bounds.s FORCE
21 $(call filechk,offsets,__LINUX_BOUNDS_H__) 14 $(call filechk,offsets,__LINUX_BOUNDS_H__)
22 15
23##### 16#####
24# 2) Generate timeconst.h 17# Generate timeconst.h
25 18
26timeconst-file := include/generated/timeconst.h 19timeconst-file := include/generated/timeconst.h
27 20
@@ -33,8 +26,7 @@ $(timeconst-file): kernel/time/timeconst.bc FORCE
33 $(call filechk,gentimeconst) 26 $(call filechk,gentimeconst)
34 27
35##### 28#####
36# 3) Generate asm-offsets.h 29# Generate asm-offsets.h
37#
38 30
39offsets-file := include/generated/asm-offsets.h 31offsets-file := include/generated/asm-offsets.h
40 32
@@ -47,8 +39,7 @@ $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
47 $(call filechk,offsets,__ASM_OFFSETS_H__) 39 $(call filechk,offsets,__ASM_OFFSETS_H__)
48 40
49##### 41#####
50# 4) Check for missing system calls 42# Check for missing system calls
51#
52 43
53always += missing-syscalls 44always += missing-syscalls
54targets += missing-syscalls 45targets += missing-syscalls
@@ -60,8 +51,7 @@ missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
60 $(call cmd,syscalls) 51 $(call cmd,syscalls)
61 52
62##### 53#####
63# 5) Check atomic headers are up-to-date 54# Check atomic headers are up-to-date
64#
65 55
66always += old-atomics 56always += old-atomics
67targets += old-atomics 57targets += old-atomics
@@ -72,14 +62,5 @@ quiet_cmd_atomics = CALL $<
72old-atomics: scripts/atomic/check-atomics.sh FORCE 62old-atomics: scripts/atomic/check-atomics.sh FORCE
73 $(call cmd,atomics) 63 $(call cmd,atomics)
74 64
75#####
76# 6) Generate constants for Python GDB integration
77#
78
79extra-$(CONFIG_GDB_SCRIPTS) += build_constants_py
80
81build_constants_py: $(timeconst-file) $(bounds-file)
82 @$(MAKE) $(build)=scripts/gdb/linux $@
83
84# Keep these three files during make clean 65# Keep these three files during make clean
85no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file) 66no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file)