| .. | .. |
|---|
| 2 | 2 | ### |
|---|
| 3 | 3 | # scripts contains sources for various helper programs used throughout |
|---|
| 4 | 4 | # 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 |
|---|
| 12 | 5 | |
|---|
| 13 | 6 | CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) |
|---|
| 14 | 7 | CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null) |
|---|
| 15 | 8 | |
|---|
| 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 |
|---|
| 27 | 19 | |
|---|
| 28 | | -HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include |
|---|
| 20 | +HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include |
|---|
| 29 | 21 | HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include |
|---|
| 30 | 22 | HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS) |
|---|
| 31 | 23 | HOSTLDLIBS_sign-file = $(CRYPTO_LIBS) |
|---|
| 32 | 24 | HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS) |
|---|
| 33 | 25 | HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS) |
|---|
| 34 | 26 | |
|---|
| 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 |
|---|
| 36 | 35 | |
|---|
| 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 |
|---|
| 39 | 38 | |
|---|
| 40 | | -extra-$(CONFIG_LTO_CLANG) += module-lto.lds |
|---|
| 39 | +# The module linker script is preprocessed on demand |
|---|
| 40 | +targets += module.lds |
|---|
| 41 | 41 | |
|---|
| 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 |
|---|
| 47 | 43 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
|---|
| 48 | | -subdir-y += mod |
|---|
| 49 | 44 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
|---|
| 50 | | -subdir-$(CONFIG_DTC) += dtc |
|---|
| 51 | | -subdir-$(CONFIG_GDB_SCRIPTS) += gdb |
|---|
| 52 | 45 | |
|---|
| 53 | 46 | # Let clean descend into subdirs |
|---|
| 54 | | -subdir- += basic kconfig package gcc-plugins |
|---|
| 47 | +subdir- += basic dtc gdb kconfig mod |
|---|