Skip to content

Commit 7ed9d13

Browse files
nsc-avmmasahir0y
authored andcommitted
kbuild: Use $(obj)/%.cc to fix host C++ module builds
Use $(obj)/ instead of $(src)/ prefix when building C++ modules for host, as explained in commit b1992c3 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory"). This fixes build failures of 'xconfig': $ make O=build/ xconfig make[1]: Entering directory '/data/linux/kbuild-review/build' GEN Makefile make[3]: *** No rule to make target '../scripts/kconfig/qconf-moc.cc', needed by 'scripts/kconfig/qconf-moc.o'. Stop. Fixes: b1992c3 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory") Reported-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Nicolas Schier <n.schier@avm.de> Tested-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 8d1001f commit 7ed9d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ $(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
146146
# Create .o file from a single .cc (C++) file
147147
quiet_cmd_host-cxxobjs = HOSTCXX $@
148148
cmd_host-cxxobjs = $(HOSTCXX) $(hostcxx_flags) -c -o $@ $<
149-
$(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE
149+
$(host-cxxobjs): $(obj)/%.o: $(obj)/%.cc FORCE
150150
$(call if_changed_dep,host-cxxobjs)
151151

152152
# Create executable from a single Rust crate (which may consist of

0 commit comments

Comments
 (0)