1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds### 31da177e4SLinus Torvalds# scripts contains sources for various helper programs used throughout 41da177e4SLinus Torvalds# the kernel for the build process. 51da177e4SLinus Torvalds# --------------------------------------------------------------------------- 61da177e4SLinus Torvalds# kallsyms: Find all symbols in vmlinux 71da177e4SLinus Torvalds 86520fe55SH. Peter AnvinHOST_EXTRACFLAGS += -I$(srctree)/tools/include 96520fe55SH. Peter Anvin 105f2fb52fSMasahiro Yamadaalways-$(CONFIG_BUILD_BIN2C) += bin2c 115f2fb52fSMasahiro Yamadaalways-$(CONFIG_KALLSYMS) += kallsyms 125f2fb52fSMasahiro Yamadaalways-$(BUILD_C_RECORDMCOUNT) += recordmcount 135f2fb52fSMasahiro Yamadaalways-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable 145f2fb52fSMasahiro Yamadaalways-$(CONFIG_ASN1) += asn1_compiler 155f2fb52fSMasahiro Yamadaalways-$(CONFIG_MODULE_SIG_FORMAT) += sign-file 165f2fb52fSMasahiro Yamadaalways-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert 175f2fb52fSMasahiro Yamadaalways-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert 181da177e4SLinus Torvalds 1910916706SShile ZhangHOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include 204520c6a4SDavid HowellsHOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include 218377bd2bSLaura AbbottHOSTLDLIBS_sign-file = -lcrypto 228377bd2bSLaura AbbottHOSTLDLIBS_extract-cert = -lcrypto 231da177e4SLinus Torvalds 2457fa1899SShile Zhangifdef CONFIG_UNWINDER_ORC 2557fa1899SShile Zhangifeq ($(ARCH),x86_64) 2657fa1899SShile ZhangARCH := x86 2757fa1899SShile Zhangendif 2857fa1899SShile ZhangHOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include 2957fa1899SShile ZhangHOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED 3057fa1899SShile ZhangHOSTLDLIBS_sorttable = -lpthread 3157fa1899SShile Zhangendif 3257fa1899SShile Zhang 335f2fb52fSMasahiro Yamadahostprogs := $(always-y) $(always-m) 341da177e4SLinus Torvalds 355f2fb52fSMasahiro Yamada# The following programs are only built on demand 365f2fb52fSMasahiro Yamadahostprogs += unifdef 3707aea3a7SSam Ravnborg 38ce2fd53aSMasahiro Yamadasubdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins 391da177e4SLinus Torvaldssubdir-$(CONFIG_MODVERSIONS) += genksyms 4093c06cbbSSerge E. Hallynsubdir-$(CONFIG_SECURITY_SELINUX) += selinux 411da177e4SLinus Torvalds 421da177e4SLinus Torvalds# Let clean descend into subdirs 4346a63d4bSMasahiro Yamadasubdir- += basic dtc gdb kconfig mod 44