All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Louis Chauvet via buildroot <buildroot@buildroot.org>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>,
	Sergey Matyukevich <geomatsi@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH v2] boot/arm-trusted-firmware: fix the RPATH of fiptool
Date: Wed, 03 Jan 2024 13:01:47 +0100	[thread overview]
Message-ID: <87h6ju62xg.fsf@48ers.dk> (raw)
In-Reply-To: <20231208174217.29735-1-louis.chauvet@bootlin.com> (Louis Chauvet via buildroot's message of "Fri, 8 Dec 2023 18:42:12 +0100")

>>>>> "Louis" == Louis Chauvet via buildroot <buildroot@buildroot.org> writes:

 > The arm-trusted-firmware package builds a host tool called "fiptool",
 > which is used during the build process of arm-trusted-firmware
 > itself. This tool links against the OpenSSL host library, and
 > therefore needs to be built with the correct RPATH pointing to
 > $HOST_DIR/lib.

 > This is why commit a957d9a90ade4194dffe3eb2fc0136bc5d077c28
 > ("boot/arm-trusted-firmware: build fiptool separately with dependency
 > o n host-openssl") added the ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL
 > variable, which builds the fiptool tool first, with the right
 > variables set, before invoking the full build of TF-A. This ensured
 > that fiptool was built with the correct RPATH.

 > However, more recent versions of TF-A have modified their Makefile
 > machinery, and fiptool is being rebuilt even if it was built
 > before. Unfortunately, this rebuild is no longer done with the right
 > flags, so we end up with a fiptool binary that no longer has the right
 > RPATH, and fiptool fails to find the OpenSSL libraries from
 > $HOST_DIR/lib.

 > In order to fix this, we take a different approach: we do not build
 > fiptool separately first, but we inject the necessary flags through
 > the HOSTCC variable. Indeed, there's no HOST_LDFLAGS or HOST_LDLIBS
 > variable or similar that would allow us to pass the -Wl,-rpath flag
 > that is needed. Shoe-horning this flag into HOSTCC gets the job done,
 > and actually simplifies our arm-trusted-firmware.mk.

 > This patch break the compatibility with version prior to 1.4 (upstream
 > commit 72610c4102990 ("build: Introduce HOSTCC flag")). v1.4 is very old
 > (July 2017), not used anymore in-tree and probably not used anymore
 > outside the tree.

 > Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
 > Co-authored-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > ---
 > Previous version:
 >    https://lore.kernel.org/buildroot/20231206164437.22191-1-louis.chauvet@bootlin.com/

 > Changes v1->v2:
 >    Update commit log about compatibilty

Committed to 2023.02.x and 2023.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-01-03 12:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 17:42 [Buildroot] [PATCH v2] boot/arm-trusted-firmware: fix the RPATH of fiptool Louis Chauvet via buildroot
2023-12-08 21:29 ` Yann E. MORIN
2024-01-03 12:01 ` Peter Korsgaard [this message]
2024-01-03 12:10   ` Baruch Siach via buildroot
2024-01-03 12:29     ` Peter Korsgaard
2024-01-03 12:39       ` Baruch Siach via buildroot
2024-01-03 12:46         ` Thomas Petazzoni via buildroot
2024-01-03 13:31           ` Peter Korsgaard

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=87h6ju62xg.fsf@48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    --cc=geomatsi@gmail.com \
    --cc=louis.chauvet@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.