6fbd6cf85a
- Fix false-positive build warnings for ARCH=ia64 builds - Optimize dictionary size for module compression with xz - Check the compiler and linker versions in Kconfig - Fix misuse of extra-y - Support DWARF v5 debug info - Clamp SUBLEVEL to 255 because stable releases 4.4.x and 4.9.x exceeded the limit - Add generic syscall{tbl,hdr}.sh for cleanups across arches - Minor cleanups of genksyms - Minor cleanups of Kconfig -----BEGIN PGP SIGNATURE----- iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmA3zhgVHG1hc2FoaXJv eUBrZXJuZWwub3JnAAoJED2LAQed4NsG0C4P/A5hUNFdkYI+EffAWZiHn69t0S8j M1GQkZildKu/yOfm6hp3mNwgHmYgw0aAuch1htkJuv+5rXRtoK77yw0xKbUqNHyO VqkJWQPVUXJbWIDiu332NaETHbFTWCnPZKGmzcbVOBHbYsXUJPp17gROQ9ke0fQN Ae6OV5WINhoS8UnjESWb3qOO87MdQTZ+9mP+NMnVh4kV1SUeMAXLFwFll66KZTkj GXB330N3p9L0wQVljhXpQ/YPOd76wJNPhJWJ9+hKLFbWsedovzlHb+duprh1z1xe 7LLaq9dEbXxe1Uz0qmK76lupXxilYMyUupTW9HIYtIsY8br8DIoBOG0bn46LVnuL /m+UQNfUFCYYePT7iZQNNc1DISQJrxme3bjq0PJzZTDukNnHJVahnj9x4RoNaF8j Dc+JME0r2i8Ccp28vgmaRgzvSsb8Xtw5icwRdwzIpyt1ubs/+tkd/GSaGzQo30Q8 m8y1WOjovHNX7OGnOaOWBGoQAX/2k/VHeAediMsPqWUoOxwsLHYxG/4KtgwbJ5vc gu/Fyk1GRDklZPpLdYFVvz8TGnqSDogJgF+7WolJ6YvPGAUIDAfd5Ky2sWayddlm wchc3sKDVyh3lov23h0WQVTvLO9xl+NZ6THxoAGdYeQ0DUu5OxwH8qje/UpWuo1a DchhNN+g5pa6n56Z =sLxb -----END PGP SIGNATURE----- Merge tag 'kbuild-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Fix false-positive build warnings for ARCH=ia64 builds - Optimize dictionary size for module compression with xz - Check the compiler and linker versions in Kconfig - Fix misuse of extra-y - Support DWARF v5 debug info - Clamp SUBLEVEL to 255 because stable releases 4.4.x and 4.9.x exceeded the limit - Add generic syscall{tbl,hdr}.sh for cleanups across arches - Minor cleanups of genksyms - Minor cleanups of Kconfig * tag 'kbuild-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (38 commits) initramfs: Remove redundant dependency of RD_ZSTD on BLK_DEV_INITRD kbuild: remove deprecated 'always' and 'hostprogs-y/m' kbuild: parse C= and M= before changing the working directory kbuild: reuse this-makefile to define abs_srctree kconfig: unify rule of config, menuconfig, nconfig, gconfig, xconfig kconfig: omit --oldaskconfig option for 'make config' kconfig: fix 'invalid option' for help option kconfig: remove dead code in conf_askvalue() kconfig: clean up nested if-conditionals in check_conf() kconfig: Remove duplicate call to sym_get_string_value() Makefile: Remove # characters from compiler string Makefile: reuse CC_VERSION_TEXT kbuild: check the minimum linker version in Kconfig kbuild: remove ld-version macro scripts: add generic syscallhdr.sh scripts: add generic syscalltbl.sh arch: syscalls: remove $(srctree)/ prefix from syscall tables arch: syscalls: add missing FORCE and fix 'targets' to make if_changed work gen_compile_commands: prune some directories kbuild: simplify access to the kernel's version ...
90 lines
3.0 KiB
Makefile
90 lines
3.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
DT_DOC_CHECKER ?= dt-doc-validate
|
|
DT_EXTRACT_EX ?= dt-extract-example
|
|
DT_MK_SCHEMA ?= dt-mk-schema
|
|
|
|
DT_SCHEMA_LINT = $(shell which yamllint)
|
|
|
|
DT_SCHEMA_MIN_VERSION = 2020.8.1
|
|
|
|
PHONY += check_dtschema_version
|
|
check_dtschema_version:
|
|
@{ echo $(DT_SCHEMA_MIN_VERSION); \
|
|
$(DT_DOC_CHECKER) --version 2>/dev/null || echo 0; } | sort -Vc >/dev/null || \
|
|
{ echo "ERROR: dtschema minimum version is v$(DT_SCHEMA_MIN_VERSION)" >&2; false; }
|
|
|
|
quiet_cmd_extract_ex = DTEX $@
|
|
cmd_extract_ex = $(DT_EXTRACT_EX) $< > $@
|
|
|
|
$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
|
|
$(call if_changed,extract_ex)
|
|
|
|
# Use full schemas when checking %.example.dts
|
|
DT_TMP_SCHEMA := $(obj)/processed-schema-examples.json
|
|
|
|
find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
|
|
-name 'processed-schema*' ! \
|
|
-name '*.example.dt.yaml' \)
|
|
|
|
quiet_cmd_yamllint = LINT $(src)
|
|
cmd_yamllint = ($(find_cmd) | \
|
|
xargs $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint) || true
|
|
|
|
quiet_cmd_chk_bindings = CHKDT $@
|
|
cmd_chk_bindings = ($(find_cmd) | \
|
|
xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)) || true
|
|
|
|
quiet_cmd_mk_schema = SCHEMA $@
|
|
cmd_mk_schema = f=$$(mktemp) ; \
|
|
$(if $(DT_MK_SCHEMA_FLAGS), \
|
|
printf '%s\n' $(real-prereqs), \
|
|
$(find_cmd)) > $$f ; \
|
|
$(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \
|
|
rm -f $$f
|
|
|
|
define rule_chkdt
|
|
$(if $(DT_SCHEMA_LINT),$(call cmd,yamllint),)
|
|
$(call cmd,chk_bindings)
|
|
$(call cmd,mk_schema)
|
|
endef
|
|
|
|
DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||')
|
|
|
|
override DTC_FLAGS := \
|
|
-Wno-avoid_unnecessary_addr_size \
|
|
-Wno-graph_child_address \
|
|
-Wno-interrupt_provider
|
|
|
|
$(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
|
|
$(call if_changed_rule,chkdt)
|
|
|
|
ifeq ($(DT_SCHEMA_FILES),)
|
|
|
|
# Unless DT_SCHEMA_FILES is specified, use the full schema for dtbs_check too.
|
|
# Just copy processed-schema-examples.json
|
|
|
|
$(obj)/processed-schema.json: $(obj)/processed-schema-examples.json FORCE
|
|
$(call if_changed,copy)
|
|
|
|
DT_SCHEMA_FILES = $(DT_DOCS)
|
|
|
|
else
|
|
|
|
# If DT_SCHEMA_FILES is specified, use it for processed-schema.json
|
|
|
|
$(obj)/processed-schema.json: DT_MK_SCHEMA_FLAGS := -u
|
|
$(obj)/processed-schema.json: $(DT_SCHEMA_FILES) check_dtschema_version FORCE
|
|
$(call if_changed,mk_schema)
|
|
|
|
endif
|
|
|
|
always-$(CHECK_DT_BINDING) += processed-schema-examples.json
|
|
always-$(CHECK_DTBS) += processed-schema.json
|
|
always-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
|
always-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
|
|
|
|
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
|
|
# build artifacts here before they are processed by scripts/Makefile.clean
|
|
clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
|
|
-name '*.example.dt.yaml' \) -delete 2>/dev/null)
|