Message ID | 20230107091820.3382134-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/7] kbuild: refactor host*_flags | expand |
On Sat, Jan 7, 2023 at 10:18 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > Remove _host*_flags. > > This will change the -Wp,-MMD,$(depfile) order in the command line > but no functional change is intended. Looks fine to me. I gave it a quick test with just this patch on top of v6.2-rc2 and checked that the order indeed changed (was there a reason to not keep it the same?). Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Tested-by: Miguel Ojeda <ojeda@kernel.org> Thanks! Cheers, Miguel
On Sun, Jan 8, 2023 at 12:12 AM Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > > On Sat, Jan 7, 2023 at 10:18 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > Remove _host*_flags. > > > > This will change the -Wp,-MMD,$(depfile) order in the command line > > but no functional change is intended. > > Looks fine to me. I gave it a quick test with just this patch on top > of v6.2-rc2 and checked that the order indeed changed (was there a > reason to not keep it the same?). No, there is no reason. Just my whimsy. I will do something like the following just in case. hostc_flags = -Wp,-MMD,$(depfile) \ $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ $(HOSTCFLAGS_$(target-stem).o) > > Reviewed-by: Miguel Ojeda <ojeda@kernel.org> > Tested-by: Miguel Ojeda <ojeda@kernel.org> > > Thanks! > > Cheers, > Miguel
On Sun, Jan 8, 2023 at 2:06 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > No, there is no reason. Just my whimsy. > > I will do something like the following just in case. > > hostc_flags = -Wp,-MMD,$(depfile) \ > $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ > $(HOSTCFLAGS_$(target-stem).o) Yeah, it sounds simpler to keep it the same, we could always do the order change in an independent patch if needed. Cheers, Miguel
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index da133780b751..dea494ef55d5 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -80,25 +80,21 @@ host-rust := $(addprefix $(obj)/,$(host-rust)) ##### # Handle options to gcc. Support building with separate output directory -_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ - $(HOSTCFLAGS_$(target-stem).o) -_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ - $(HOSTCXXFLAGS_$(target-stem).o) -_hostrust_flags = $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \ - $(HOSTRUSTFLAGS_$(target-stem)) +hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ + $(HOSTCFLAGS_$(target-stem).o) -Wp,-MMD,$(depfile) +hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ + $(HOSTCXXFLAGS_$(target-stem).o) -Wp,-MMD,$(depfile) +hostrust_flags = $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \ + $(HOSTRUSTFLAGS_$(target-stem)) # $(objtree)/$(obj) for including generated headers from checkin source files ifeq ($(KBUILD_EXTMOD),) ifdef building_out_of_srctree -_hostc_flags += -I $(objtree)/$(obj) -_hostcxx_flags += -I $(objtree)/$(obj) +hostc_flags += -I $(objtree)/$(obj) +hostcxx_flags += -I $(objtree)/$(obj) endif endif -hostc_flags = -Wp,-MMD,$(depfile) $(_hostc_flags) -hostcxx_flags = -Wp,-MMD,$(depfile) $(_hostcxx_flags) -hostrust_flags = $(_hostrust_flags) - ##### # Compile programs on the host
Remove _host*_flags. This will change the -Wp,-MMD,$(depfile) order in the command line but no functional change is intended. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- Changes in v2: - New patch scripts/Makefile.host | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)