From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Kristof Robot <krirobo@gmail.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] gcc-common: Only apply fpu settings to target gcc
Date: Tue, 28 Oct 2014 11:31:03 +0000 [thread overview]
Message-ID: <1414495863.7967.142.camel@ted> (raw)
In-Reply-To: <CAFgGSN6xBxoQpF3wSJMNnyeAnOQ-MDTAr4DqJ4adXb9MgEnEpw@mail.gmail.com>
On Tue, 2014-10-28 at 11:30 +0100, Kristof Robot wrote:
> On Mon, Oct 27, 2014 at 11:59 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Mon, 2014-10-27 at 20:54 +0100, Kristof Robot wrote:
> >> Richard, all,
> >>
> >> After bisecting, I found that, since this patch, my toolchain is being
> >> built with soft floating point support, while it should be built with
> >> hard floating point support:
> >>
> [snip]
> >> I am using DEFAULTTUNE = "cortexa7hf-neon-vfpv4", resulting in
> >> following build configuration parameters:
> >> TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard vfpv4 cortexa7"
> >> TARGET_FPU = "vfp-vfpv4-neon"
> >
> > When building in OE, we always pass in the correct flags to gcc to
> > ensure the correct thing gets built. The option you're changing with the
> > revert just changed the default used by gcc if no option is specified on
> > the commandline, so the change of the above test isn't a surprise.
> >
> > What is the real world problem you're seeing due to this? Is it caused
> > by some compiler flags not being passed in somewhere?
>
> The real world problem is a compilation of the meta-ros libfreenect
> library [1] for a Cubieboard2 [2] - this build fails because the
> compiler fails to find <gnu/stubs-hard.h> (only gnu/stubs-soft.h is
> available).
> In other words, somehow libfreenect (correctly) expects hard floating
> point, but then runs into troubles as the toolchain is (incorrectly)
> compiled using soft floating point.
> See also [3], which describes a similar problem, and [4], which seems
> to provide relevant info.
>
> More generally, I would actually assume that everything is being built
> hard floating point, as a result of the provided DEFAULTTUNE =
> "cortexa7hf-neon-vfpv4".
>
> Isn't this the correct way to force hard floating point?
There is something wrong somewhere by the sounds of it but I'm not 100%
sure where. With that tune, bitbake -e | grep CC= should show that CC is
something along the lines of:
CC="arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon-vfpv4 -mtune=cortex-a7 --sysroot=X"
the key part being -mfloat-abi=hard. When (e)glibc is built, which
should be built specifically for this configuration, it should see that
setting in the various flags and should generate headers like:
./image/usr/include/gnu/stubs-hard.h
./image/usr/include/gnu/stubs.h
i.e. it should build a C library that matches this configuration and has
the right headers. When libfreenect is built, the right headers should
then be available.
So, I'd suggest checking that the compiler flags in CC are what you'd
expect and then that the C library is built with the right format
headers. Something, somewhere isn't honouring the flags correctly as far
as I can tell but I don't know what.
Also, I'd be aware of the fact that we build one cross compiler
(gcc-cross) for arm which is meant to work for all arm targets. If you
build a softfloat something, then a hardfloat machine, it may be that
something bad is creeping into the build process and a straight revert
may not reproduce the bug you're seeing.
Cheers,
Richard
next prev parent reply other threads:[~2014-10-28 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 15:40 [PATCH] gcc-common: Only apply fpu settings to target gcc Richard Purdie
2014-10-27 19:54 ` Kristof Robot
2014-10-27 22:59 ` Richard Purdie
2014-10-28 10:30 ` Kristof Robot
2014-10-28 11:31 ` Richard Purdie [this message]
[not found] ` <CAFgGSN7R=pnPNrakJLZqG4S7ENiHx5qiaRSudb--LR-CTpELXw@mail.gmail.com>
[not found] ` <CAFgGSN76NRcBXG6Z=72aek3GVX=e7VqVDQ4FhdxoJLPg1af2ig@mail.gmail.com>
[not found] ` <1414534100.7967.173.camel@ted>
[not found] ` <CAFgGSN5T9UDFuzCqU+vsOSVy+uiwhxUf-ApGAQ80QAdSBoUHdQ@mail.gmail.com>
[not found] ` <1414572117.7967.179.camel@ted>
2014-10-29 9:24 ` Kristof Robot
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=1414495863.7967.142.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=krirobo@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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