From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: enable CONFIG_USE_PRIVATE_LIBGCC by default (re-send to the correct address)
Date: Thu, 02 Jul 2015 14:46:28 +0200 [thread overview]
Message-ID: <559532A4.30900@gmail.com> (raw)
In-Reply-To: <20150702073957.D512D381008@gemini.denx.de>
Am 02.07.2015 um 09:39 schrieb Wolfgang Denk:
> Dear Daniel,
>
> In message <55947A25.5020702@gmail.com> you wrote:
>>
>> CONFIG_USE_PRIVATE_LIBGCC should be removed. If an architecture supports
>> a private libgcc, then it should always use it. I think for U-Boot it is
>> better and safer to have all code under control instead of pulling in
>> external code from toolchains which are often somehow broken.
>
> This is the wrong approach. If a tool is broken, it should be
> reported, and fixed.
>
>> Speaking for MIPS we have boards with all combinations of Big
>> Endian/Little Endian and Hard Float/Soft Float. You need an own libgcc
>> binary for each FPU variant, but almost no toolchain supports this. Thus
>
> Why would that be the case? We do not use any floating point stuff in
> U-Boot...
the toolchain need to provide a binary libgcc.a for each combination of
Endianess and FPU variant otherwise you will get errors on linking
libgcc.a to U-Boot. U-Boot needs at least BE/SoftFloat and LE/SoftFloat.
But you only have multiple libgcc.a binaries in a dedicated multilib
toolchain. AFAIK only CodeSourcery and Yocto-based ELDK supports this.
Other pre-built toolchains usually support only one combination.
Furthermore toolchains like Yocto or kernel.org often use HardFloat by
default. For using buildman without CONFIG_USE_PRIVATE_LIBGCC you either
have to look for a suitable multilib toolchain or you have to fiddle
with multiple toolchains.
The simplest and safest way is to bundle the SoftFloat implementation of
the few GCC functions needed from libgcc in U-Boot. That code will be
compiled then in the correct Endianess dependend on the board config.
>
>
> I agree that there is the endianess issue - MIPS is currently the
> only architecture (I am aware of) that supports both BE and LE con-
> figurations. But this is a tool chain issue! You will need support
> from the tool chain not only for U-Boot (and the kernel), but also for
> user space. If your tool chain is nbroken, it needs fixing.
>
>> BTW: Linux kernel or Barebox always use a private libgcc.
>
> And what do you do about user space with such a broken tool chain?
>
> It does not help to paper over problems.
>
> Best regards,
>
> Wolfgang Denk
>
if you only target a specific board with U-Boot, OS, Userspace then you
can choose a toolchain with the right combination of Endianess, FPU
variant and libc.
The problem only occurs with buildman or bare-metal toolchains. The
toolchains do not need to be broken.
--
- Daniel
next prev parent reply other threads:[~2015-07-02 12:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 12:37 [U-Boot] [PATCH] ARM: enable CONFIG_USE_PRIVATE_LIBGCC by default Masahiro Yamada
2015-04-16 9:21 ` Albert ARIBAUD
2015-07-01 21:21 ` Albert ARIBAUD
2015-07-01 21:40 ` Albert ARIBAUD
2015-07-02 12:21 ` Masahiro Yamada
2015-07-02 12:43 ` Albert ARIBAUD
2015-07-02 12:54 ` Masahiro Yamada
2015-07-02 13:03 ` Albert ARIBAUD
2015-07-01 21:42 ` [U-Boot] [PATCH] ARM: enable CONFIG_USE_PRIVATE_LIBGCC by default (re-send to the correct address) Albert ARIBAUD
2015-07-01 21:50 ` Wolfgang Denk
2015-07-01 22:04 ` Albert ARIBAUD
2015-07-01 23:39 ` Daniel Schwierzeck
2015-07-02 5:49 ` Albert ARIBAUD
2015-07-02 7:39 ` Wolfgang Denk
2015-07-02 12:40 ` Masahiro Yamada
2015-07-03 9:53 ` Wolfgang Denk
2015-07-02 12:46 ` Daniel Schwierzeck [this message]
2015-07-03 9:59 ` Wolfgang Denk
2015-07-02 12:18 ` Masahiro Yamada
2015-07-02 12:29 ` Masahiro Yamada
2015-07-03 9:29 ` Wolfgang Denk
2015-07-02 7:34 ` Wolfgang Denk
2015-07-02 12:12 ` Masahiro Yamada
2015-07-03 9:25 ` Wolfgang Denk
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=559532A4.30900@gmail.com \
--to=daniel.schwierzeck@gmail.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