Commit 7ed9d131 authored by Nicolas Schier's avatar Nicolas Schier Committed by Masahiro Yamada

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 b1992c37 ("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: b1992c37 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
Reported-by: default avatarRolf Eike Beer <eb@emlix.com>
Signed-off-by: default avatarNicolas Schier <n.schier@avm.de>
Tested-by: default avatarRolf Eike Beer <eb@emlix.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 8d1001f7
......@@ -146,7 +146,7 @@ $(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
# Create .o file from a single .cc (C++) file
quiet_cmd_host-cxxobjs = HOSTCXX $@
cmd_host-cxxobjs = $(HOSTCXX) $(hostcxx_flags) -c -o $@ $<
$(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE
$(host-cxxobjs): $(obj)/%.o: $(obj)/%.cc FORCE
$(call if_changed_dep,host-cxxobjs)
# Create executable from a single Rust crate (which may consist of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment