Re: PowerPC compilation flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Segher,
just to let you know that your help did the trick. Thank you very much. I
am using
*-mfloat-gprs=single -Wdouble-promotion -fsingle-precision-constant *in
order to prevent any double precision and so far it looks good!

On Sun, Nov 25, 2018 at 7:35 PM Segher Boessenkool <
segher@xxxxxxxxxxxxxxxxxxx> wrote:

> On Sun, Nov 25, 2018 at 06:41:23PM -0500, Felipe GM wrote:
> > Em 2018-11-25 6:23 p.m., Segher Boessenkool escreveu:
> > >*Your CPU has hardware support for single precision only. You get the
> > >soft float support for double precision (like that __divdf3, yes --
> > >anything "df"). This is what -mfloat-gprs=single does :-)*
> > That is bugging me badly. I am not trying to use double float at any
> > point. Still, I am getting complaints about the linker trying to use
> > them. Any clue why? That is the reason I was (am) trying to use
> > -mfloat-gprs=double.
>
> You may have written something like
>
>   float x = ...;
>   x /= 10.0;
>
> which does the calculation as *double*.  You need to write
>
>   x /= 10.0f;
>
> if you want a single-precision division.
>
> Similar for the other unexpected functions.
>
> There is a warning to help you find these: -Wdouble-promotion .
>
> > >*You always should link libgcc. This is the default if you link using
> > >gcc, but your custom linker scripts may have other plans ;-)*
> > libcc is not an option, sadly. I have a very restrict (and in need of
> > certification for compliance) application, so extra resources
> > (libraries) are not possible.
>
> All code compiled with GCC always has to be linked with libgcc.  This
> library is required.  GCC can (and will, as you saw) generate calls to it
> for various constructs that the target port did not implement directly, or
> that are best implemented as a function (__divdf3 is more than 1800 bytes
> for example, you do not want to inline that everywhere).
>
>
> Segher
>


-- 
Felipe GM



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux