From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] EABIhf: breaks kernel build
Date: Fri, 19 Jul 2013 20:11:53 +0200 [thread overview]
Message-ID: <20130719181153.GD3751@free.fr> (raw)
In-Reply-To: <20130719161733.GC3751@free.fr>
Thomas, All,
On 2013-07-19 18:17 +0200, Yann E. MORIN spake thusly:
> Since the ARM EABIhf stuff was committed, the Linux kernel build is
> broken, and fails with this message:
> armv6-rpi36-linux-gnueabi-gcc: error: -mfloat-abi=soft and
> -mfloat-abi=hard may not be used together
>
> This is because -mfloat-abi=hard is hard-coded in the wrapper, but the
> kernel wants to pass -msoft-float.
>
> See attach exerpt of my build log (with a instrumented ext-ttolchain
> wrapper). Notice argv[6] and argv[41]:
>
> argv[6]='-mfloat-abi=hard'
> argv[41]='-msoft-float'
>
> argv[6] is out hard-coded float ABI option, while argv[41] is passed by
> the kernel.
>
> I don't know how to solve this.
>
> The trivial and immediate idea would be to have a black-list of
> arguments and exclude the ones we pass that conflict with the ones
> passed on the command line, but this will be *very* complex and always
> incomplete.
>
> An alternate idea would be to detect we're building a Linux kernel by
> looking at -D__KERNEL__ in the command line arguments, and if so, not
> pass our hard-coded args. This would work for the Linux kernel, but
> would break for other packages (eg. U-Boot?).
>
> Another way would be to look at the environment and check if a variable
> is set (eg. BR_IN_KERNEL_OR_UBOOT_OR_WHATEVER) and in this case not pass
> our hard-coded options. While it would work from inside Buildroot, it
> would break as soon as the user would want to use the toolchain directly
> from outside Buildroot.
>
> Or simply not pass -mfloat-abi=hard at all.
One way which would solve my special case would be to only pass the
sysroot in the wrapper, since my toolchain is already optimised by
default for my target.
So, an option like (give another!):
config BR2_TOOLCHAIN_WRAPPER_SYSROOT_ONLY
bool "External toolchain is already optimised for the target"
help
Say 'Y' here if your external toolchain is configured to
emit optimised code for your target.
If it is not the case, or you are unsure, say 'N', the default.
Then guard the extra hard-coded args between #ifdef...#endif, keeping
only the sysroot arg.
No, this is not the solution at all. But at least it would work when the
external toolchain has been tailored for the target in the first place.
For now, I've just guarded all float-related args between:
#if defined NOT_DEFINED
...
#endif
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2013-07-19 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 16:17 [Buildroot] EABIhf: breaks kernel build Yann E. MORIN
2013-07-19 18:11 ` Yann E. MORIN [this message]
2013-07-19 20:07 ` 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=20130719181153.GD3751@free.fr \
--to=yann.morin.1998@free.fr \
--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