Skip to content

Commit 89e89d4

Browse files
masahir0ySasha Levin
authored andcommitted
kbuild: refactor host*_flags
[ Upstream commit 16169a4 ] Remove _host*_flags. No functional change is intended. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Tested-by: Miguel Ojeda <[email protected]> Stable-dep-of: ded103c ("kbuild: rust: force `alloc` extern to allow "empty" Rust files") Signed-off-by: Sasha Levin <[email protected]>
1 parent fe3a40e commit 89e89d4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

scripts/Makefile.host

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,23 @@ host-rust := $(addprefix $(obj)/,$(host-rust))
8080
#####
8181
# Handle options to gcc. Support building with separate output directory
8282

83-
_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
83+
hostc_flags = -Wp,-MMD,$(depfile) \
84+
$(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
8485
$(HOSTCFLAGS_$(target-stem).o)
85-
_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
86+
hostcxx_flags = -Wp,-MMD,$(depfile) \
87+
$(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
8688
$(HOSTCXXFLAGS_$(target-stem).o)
87-
_hostrust_flags = $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
88-
$(HOSTRUSTFLAGS_$(target-stem))
89+
hostrust_flags = $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
90+
$(HOSTRUSTFLAGS_$(target-stem))
8991

9092
# $(objtree)/$(obj) for including generated headers from checkin source files
9193
ifeq ($(KBUILD_EXTMOD),)
9294
ifdef building_out_of_srctree
93-
_hostc_flags += -I $(objtree)/$(obj)
94-
_hostcxx_flags += -I $(objtree)/$(obj)
95+
hostc_flags += -I $(objtree)/$(obj)
96+
hostcxx_flags += -I $(objtree)/$(obj)
9597
endif
9698
endif
9799

98-
hostc_flags = -Wp,-MMD,$(depfile) $(_hostc_flags)
99-
hostcxx_flags = -Wp,-MMD,$(depfile) $(_hostcxx_flags)
100-
hostrust_flags = $(_hostrust_flags)
101-
102100
#####
103101
# Compile programs on the host
104102

0 commit comments

Comments
 (0)