From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] Use libm.so when testing external compiler ABI
Date: Fri, 14 Feb 2014 15:36:34 +0100 [thread overview]
Message-ID: <20140214153634.1377738a@skate> (raw)
In-Reply-To: <1392385415-19367-1-git-send-email-syntheticpp@gmx.net>
Dear Peter K?mmel,
On Fri, 14 Feb 2014 14:43:35 +0100, Peter K?mmel wrote:
> crt1.o could not be used to test for eabihf because
> it does not list the tag Tag_ABI_VFP_args.
>
> Signed-off-by: Peter K?mmel <syntheticpp@gmx.net>
> ---
> toolchain/helpers.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index faa9d90..c41d757 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -284,8 +284,8 @@ check_arm_abi = \
> echo "External toolchain uses the unsuported OABI" ; \
> exit 1 ; \
> fi ; \
> - EXT_TOOLCHAIN_CRT1=`LANG=C $${__CROSS_CC} -print-file-name=crt1.o` ; \
> - if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_CRT1} | grep -q "Tag_ABI_VFP_args:" ; then \
> + EXT_TOOLCHAIN_LIBM=`LANG=C $${__CROSS_CC} -print-file-name=libm.so` ; \
> + if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_LIBM} | grep -q "Tag_ABI_VFP_args:" ; then \
> EXT_TOOLCHAIN_ABI="eabihf" ; \
> else \
> EXT_TOOLCHAIN_ABI="eabi" ; \
This is more or less the same patch as proposed at
https://bugs.busybox.net/show_bug.cgi?id=6842.
Originally, the reason why I had chosen to check crt1.o instead of
a .so file is because crt1.o exists even for purely static toolchains
(i.e no support for shared libraries). Even though I admit that the
likelihood of finding such toolchains for ARM is quite small, I'd like
to understand why crt1.o doesn't have the Tag_ABI_VFP_args. Is this
happening when using a Buildroot toolchain as an external toolchain? If
so, maybe it's Buildroot who actually does something wrong when
building the toolchain, because the Linaro toolchains do have
Tag_ABI_VFP_args in crt1.o :
The multilib variant compiled EABIhf:
$ arm-linux-gnueabihf-readelf -A ./arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabihf/crt1.o | grep Tag_ABI_VFP_args
Tag_ABI_VFP_args: VFP registers
$
The multilib variant compiled EABI:
$ arm-linux-gnueabihf-readelf -A ./arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabi/crt1.o | grep Tag_ABI_VFP_args
$
So I'd prefer to have an understanding of why crt1.o is not EABIhf
before applying this patch.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-02-14 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 13:43 [Buildroot] [PATCH 1/1] Use libm.so when testing external compiler ABI Peter Kümmel
2014-02-14 14:36 ` Thomas Petazzoni [this message]
2014-02-14 15:02 ` Peter Kuemmel
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=20140214153634.1377738a@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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