hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/scripts/Makefile
....@@ -2,53 +2,46 @@
22 ###
33 # scripts contains sources for various helper programs used throughout
44 # the kernel for the build process.
5
-# ---------------------------------------------------------------------------
6
-# kallsyms: Find all symbols in vmlinux
7
-# pnmttologo: Convert pnm files to logo files
8
-# conmakehash: Create chartable
9
-# conmakehash: Create arrays for initializing the kernel console tables
10
-
11
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include
125
136 CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
147 CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
158
16
-hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
17
-hostprogs-$(CONFIG_KALLSYMS) += kallsyms
18
-hostprogs-$(CONFIG_LOGO) += pnmtologo
19
-hostprogs-$(CONFIG_VT) += conmakehash
20
-hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
21
-hostprogs-$(CONFIG_ARCH_ROCKCHIP) += resource_tool mkkrnlimg
22
-hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable
23
-hostprogs-$(CONFIG_ASN1) += asn1_compiler
24
-hostprogs-$(CONFIG_MODULE_SIG) += sign-file
25
-hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
26
-hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
9
+hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c
10
+hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms
11
+hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
12
+hostprogs-always-$(CONFIG_ARCH_ROCKCHIP) += resource_tool
13
+hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
14
+hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
15
+hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
16
+hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
17
+hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
18
+hostprogs-always-$(CONFIG_SYSTEM_REVOCATION_LIST) += extract-cert
2719
28
-HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
20
+HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
2921 HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
3022 HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
3123 HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
3224 HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
3325 HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
3426
35
-always := $(hostprogs-y) $(hostprogs-m)
27
+ifdef CONFIG_UNWINDER_ORC
28
+ifeq ($(ARCH),x86_64)
29
+ARCH := x86
30
+endif
31
+HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
32
+HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
33
+HOSTLDLIBS_sorttable = -lpthread
34
+endif
3635
37
-# The following hostprogs-y programs are only build on demand
38
-hostprogs-y += unifdef
36
+# The following programs are only built on demand
37
+hostprogs += unifdef
3938
40
-extra-$(CONFIG_LTO_CLANG) += module-lto.lds
39
+# The module linker script is preprocessed on demand
40
+targets += module.lds
4141
42
-# These targets are used internally to avoid "is up to date" messages
43
-PHONY += build_unifdef
44
-build_unifdef: $(obj)/unifdef
45
- @:
46
-
42
+subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
4743 subdir-$(CONFIG_MODVERSIONS) += genksyms
48
-subdir-y += mod
4944 subdir-$(CONFIG_SECURITY_SELINUX) += selinux
50
-subdir-$(CONFIG_DTC) += dtc
51
-subdir-$(CONFIG_GDB_SCRIPTS) += gdb
5245
5346 # Let clean descend into subdirs
54
-subdir- += basic kconfig package gcc-plugins
47
+subdir- += basic dtc gdb kconfig mod