public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tuomas Tynkkynen <tuomas@tuxera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Depending on an .o  file in other directory in Kbuild?
Date: Fri, 23 Mar 2018 18:38:46 +0200	[thread overview]
Message-ID: <20180323183846.30bb0cf0@duuni> (raw)

Hi,

I finally managed to track down the parallel make issue in helloworld.efi:
(previous posting at https://www.mail-archive.com/u-boot at lists.denx.de/msg268726.html):

make[2]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by '__build'.  Stop.

The problematic make rule seems to be this from scripts/Makefile.lib:

$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \                                                                                                 
                arch/$(ARCH)/lib/$(EFI_RELOC)                                                                                                              
        $(call cmd,efi_ld)                                                                                                                                 

So if I understood the recursive make in Kbuild correctly, during
the build of the lib/efi_loader/ subdirectory, rules from other
makefiles aren't visible (in this case the rules in arch/arm/lib/).
That is, the build usually works because arch/arm/lib/ has been
built by the time make descends into lib/efi_loader/ and the
$(EFI_CRT0) and $(EFI_RELOC) have already been built. But
when the order is swapped around due to parallel make, the
build fails.

I have no idea how this should be done correctly in Kbuild,
so if anybody else knows how to fix this, help is appreciated!

Thanks,
-Tuomas

                 reply	other threads:[~2018-03-23 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180323183846.30bb0cf0@duuni \
    --to=tuomas@tuxera.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox