PowerPC compilation flags
Segher Boessenkool
segher@kernel.crashing.org
Sun Nov 25 22:26:00 GMT 2018
Hello Felipe,
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).
> |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.
> Please notice the|-mfloat-gprs=single|flag. That is the one that is
> giving problems.
>
> When I use|-mfloat-gprs=single|, I am not able to compile things
> properly, as some functions are not implemented:
>
> |undefined reference to `__extendsfdf2`,undefined reference to
> `__adddf3`,undefined reference to `__divdf3`,|
>
> - among others.
That works fine for me (those functions are in libgcc.a).
Please open a PR for GCC 7 (and GCC 8).
Segher
More information about the Gcc-help
mailing list