Re: PowerPC compilation flags

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

 




Em 2018-11-25 6:23 p.m., Segher Boessenkool escreveu:
Hi!

On Sun, Nov 25, 2018 at 05:36:38PM -0500, Felipe GM wrote:
On Sun, Nov 25, 2018 at 02:42:10PM -0500, Felipe GM wrote:
Currently I am developing for a MPC5777 board, with e200z7 cores. Most
of the things are going well, but I am stuck with a problem that is
really annoying me already. I am trying to use floating point operations
on portions of my code, using the embedded hardware support. My
toolchain is GCC 6.3 (powerpc-gcc, although I have tried with 7.3 and
8.2 too), for which I am using the following flags:
*GCC 6 is no longer maintained. GCC 8 powerpc*-* does not support SPE
anymore (you need to configure for powerpc*-*spe* instead; you
probably want that for GCC 6 and GCC 7 as well).*
That is why I tried 7.3 and 8.2! Regarding powerpc-*-spe, do you mean to
use a different cross gcc? Or just different compilation flags?
*It's easiest if you build for target powerpc-eabispe or whatever you have. That will default -mspe etc.; and you may not even be able to switch it on other configurations, at all.*
Ok, will do.

|ASFLAGS_BASE =-g -a32 -mbooke -me500 --fatal-warnings ARCH_FLAGS
=-mpowerpc-gpopt -mfprnd -misel -m32 -mhard-float-mabi=spe -mmfpgpr
-mfloat-gprs=single|
*-mpowerpc-gpopt, -mfprnd, -mmfpgpr, and -mhard-float do not make
sense for your target.*
I have used most of them in order to try to solve the issue. One
question here though. When I use -mspe (or something similar, depending
on the gcc version) flag, not always the floating point support is
provided. More than once the linker asked for the unimplemented
functions, similar to what I said before (__divdf3, etc).
*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 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.


Segher
--
Ph.D. Felipe Gohring de Magalhães
Curriculum Lattes <http://lattes.cnpq.br/4701534141479314>



[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