diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-14 00:45:21 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-28 00:11:55 +0100 |
commit | 000e22a80de0727839bb753159ac05c8ba20c3e3 (patch) | |
tree | e37858ef7e4ef8927f237020cfcefe5dc4e7647d /scripts/Makefile.lib | |
parent | kbuild: remove support for single %.symtypes build rule (diff) | |
download | linux-000e22a80de0727839bb753159ac05c8ba20c3e3.tar.xz linux-000e22a80de0727839bb753159ac05c8ba20c3e3.zip |
kbuild: move cmd_cc_o_c and cmd_as_o_S to scripts/Malefile.lib
The cmd_cc_o_c and cmd_as_o_S macros are duplicated in
scripts/Makefile.{build,modfinal,vmlinux}.
This commit factors them out to scripts/Makefile.lib.
No functional changes are intended.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5660dfc9ed36..c0b485ab029a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -298,6 +298,18 @@ $(foreach m, $1, \ $(addprefix $(obj)/, $(call suffix-search, $(patsubst $(obj)/%,%,$m), $2, $3)))) endef +# Build commands +# =========================================================================== +# These are shared by some Makefile.* files. + +quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ + cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< \ + $(cmd_ld_single_m) \ + $(cmd_objtool) + +quiet_cmd_as_o_S = AS $(quiet_modtag) $@ + cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< $(cmd_objtool) + # Copy a file # =========================================================================== # 'cp' preserves permissions. If you use it to copy a file in read-only srctree, |