public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds
@ 2024-06-24 11:12 Nicolas Schier
  2024-06-24 11:14 ` Rolf Eike Beer
  2024-06-25 14:05 ` Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Schier @ 2024-06-24 11:12 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, Rolf Eike Beer

Use $(obj)/ instead of $(src)/ prefix when building C++ modules for
host, as explained in commit b1992c3772e6 ("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: b1992c3772e6 ("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>
---
 scripts/Makefile.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index d35f55e0d141..e85be7721a48 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -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

---
base-commit: 224a21441b0925ce1e60afb27629773a522c946e
change-id: 20240624-kbuild-fix-xconfig-f0e95d0d5b27

Best regards,
-- 
Nicolas Schier


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds
  2024-06-24 11:12 [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds Nicolas Schier
@ 2024-06-24 11:14 ` Rolf Eike Beer
  2024-06-25 14:05 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Rolf Eike Beer @ 2024-06-24 11:14 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
	Nicolas Schier
  Cc: linux-kbuild, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

On Montag, 24. Juni 2024 13:12:14 MESZ Nicolas Schier wrote:
> Use $(obj)/ instead of $(src)/ prefix when building C++ modules for
> host, as explained in commit b1992c3772e6 ("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: b1992c3772e6 ("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>

Thanks, works for me.

Tested-by: Rolf Eike Beer <eb@emlix.com>

-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@emlix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds
  2024-06-24 11:12 [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds Nicolas Schier
  2024-06-24 11:14 ` Rolf Eike Beer
@ 2024-06-25 14:05 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2024-06-25 14:05 UTC (permalink / raw)
  To: Nicolas Schier
  Cc: Nathan Chancellor, Nicolas Schier, linux-kbuild, linux-kernel,
	Rolf Eike Beer

On Mon, Jun 24, 2024 at 8:12 PM Nicolas Schier <n.schier@avm.de> wrote:
>
> Use $(obj)/ instead of $(src)/ prefix when building C++ modules for
> host, as explained in commit b1992c3772e6 ("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: b1992c3772e6 ("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>

Applied to linux-kbuild.
Thanks!



> ---
>  scripts/Makefile.host | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.host b/scripts/Makefile.host
> index d35f55e0d141..e85be7721a48 100644
> --- a/scripts/Makefile.host
> +++ b/scripts/Makefile.host
> @@ -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
>
> ---
> base-commit: 224a21441b0925ce1e60afb27629773a522c946e
> change-id: 20240624-kbuild-fix-xconfig-f0e95d0d5b27
>
> Best regards,
> --
> Nicolas Schier
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-25 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 11:12 [PATCH] kbuild: Use $(obj)/%.cc to fix host C++ module builds Nicolas Schier
2024-06-24 11:14 ` Rolf Eike Beer
2024-06-25 14:05 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox