From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Romain Naour <romain.naour@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 3/3] package/elf2flt: fix build with binutils >= 2.41 due to libbfd location
Date: Sun, 06 Aug 2023 13:47:41 +0300 [thread overview]
Message-ID: <878rao78e2.fsf@tarshish> (raw)
In-Reply-To: <20230806102554.46261-3-thomas.petazzoni@bootlin.com>
Hi Thomas,
On Sun, Aug 06 2023, Thomas Petazzoni via buildroot wrote:
> elf2flt needs to link against libbfd.a and libiberty.a which are
> provided by host-binutils, but not installed, so we poke directory
> into the host-binutils build directory. While not very nice, it has
> already been like this for a long time. We could build host-binutils
> with --enable-install-libbfd and --enable-install-libiberty so that
> those libraries are installed, but we prefer to do this separately,
> and there is a serious potential for perturbations to other packages
> by having libbfd/libiberty installed in $(HOST_DIR).
>
> In the mean time, an issue of poking directly into the host-binutils
> build directory is that the location of libbfd.a has changed in
> binutils >= 2.41, so we special case binutils 2.39 and 2.40, which are
> the two remaining versions still using the "old" path".
>
> Note: the ARC-special binutils version is not considered because
> Buildroot only supports ARC CPUs with a MMU and therefore host-elf2flt
> is never used on ARC.
>
> Fixes:
>
> gcc: error: /builds/buildroot.org/toolchains-builder/build/output/build/host-binutils-2.41/bfd/libbfd.a: No such file or directory
>
> When build host-elf2flt against host-binutils 2.41.
>
> This issue is not visible in the autobuilders as it is hidden by the
> BFD_VMA_FMT issue fixed in the previous commit.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> package/elf2flt/elf2flt.mk | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk
> index 6cd0786c3d..a524b1b737 100644
> --- a/package/elf2flt/elf2flt.mk
> +++ b/package/elf2flt/elf2flt.mk
> @@ -14,12 +14,27 @@ HOST_ELF2FLT_DEPENDENCIES = host-binutils host-zlib
> # 0001-elf2flt-handle-binutils-2.34.patch
> HOST_ELF2FLT_AUTORECONF = YES
>
> +# elf2flt needs to link against libbfd.a and libiberty.a which are
> +# provided by host-binutils, but not installed, so we poke directory
s/directory/directly/, I believe.
The same issue in also the commit log above.
baruch
> +# into the host-binutils build directory. Turns out that the location
> +# of libbfd.a has changed in binutils >= 2.41, so we special case
> +# binutils 2.39 and 2.40, which are the two remaining versions still
> +# using the "old" path". Note: the ARC-special binutils version is not
> +# considered because Buildroot only supports ARC CPUs with a MMU and
> +# therefore host-elf2flt is never used on ARC. libiberty.a has
> +# remained at the same location.
> +ifeq ($(BR2_BINUTILS_VERSION_2_39_X)$(BR2_BINUTILS_VERSION_2_40_X),y)
> +HOST_ELF2FLT_LIBBFD_PATH = $(HOST_BINUTILS_DIR)/bfd/libbfd.a
> +else
> +HOST_ELF2FLT_LIBBFD_PATH = $(HOST_BINUTILS_DIR)/bfd/.libs/libbfd.a
> +endif
> +
> # It is not exactly a host variant, but more a cross variant, which is
> # why we pass a special --target option.
> HOST_ELF2FLT_CONF_OPTS = \
> --with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \
> --with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \
> - --with-libbfd=$(HOST_BINUTILS_DIR)/bfd/libbfd.a \
> + --with-libbfd=$(HOST_ELF2FLT_LIBBFD_PATH) \
> --with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \
> --target=$(GNU_TARGET_NAME) \
> --disable-werror
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-06 10:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-06 10:25 [Buildroot] [PATCH 1/3] package/elf2flt: refresh patches Thomas Petazzoni via buildroot
2023-08-06 10:25 ` [Buildroot] [PATCH 2/3] package/elf2flt: backport upstream patch to remove use of BFD_VMA_FMT Thomas Petazzoni via buildroot
2023-08-06 10:25 ` [Buildroot] [PATCH 3/3] package/elf2flt: fix build with binutils >= 2.41 due to libbfd location Thomas Petazzoni via buildroot
2023-08-06 10:47 ` Baruch Siach via buildroot [this message]
2023-08-06 13:45 ` Thomas Petazzoni via buildroot
2023-08-06 12:54 ` [Buildroot] [PATCH 1/3] package/elf2flt: refresh patches Waldemar Brodkorb
2023-08-06 13:43 ` Thomas Petazzoni via buildroot
2023-08-06 13:45 ` Thomas Petazzoni via buildroot
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=878rao78e2.fsf@tarshish \
--to=buildroot@buildroot.org \
--cc=baruch@tkos.co.il \
--cc=romain.naour@gmail.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.