This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
math.h errors with PowerPC target?
- From: nirav dot dalal at teradyne dot com
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 24 Feb 2004 15:10:31 -0500
- Subject: math.h errors with PowerPC target?
Hi,
I'm having issues with compiling gcc when math.h is included
with PowerPC target.
I have tried switches to include math.h, like -lm, -ffast-math
but everytime it gives me the following errors:
----------------------------------------------------------------------------
In file included from foo.cpp:3:
c:/mingw/include/math.h:31:20: _mingw.h: No such file or directory
In file included from foo.cpp:3:
c:/mingw/include/math.h:149: error: syntax error before `double'
c:/mingw/include/math.h:150: error: syntax error before `double'
c:/mingw/include/math.h:151: error: syntax error before `double'
c:/mingw/include/math.h:152: error: syntax error before `double'
c:/mingw/include/math.h:153: error: syntax error before `double'
c:/mingw/include/math.h:154: error: syntax error before `double'
c:/mingw/include/math.h:155: error: syntax error before `double'
c:/mingw/include/math.h:156: error: syntax error before `double'
c:/mingw/include/math.h:157: error: syntax error before `double'
c:/mingw/include/math.h:158: error: syntax error before `double'
c:/mingw/include/math.h:159: error: syntax error before `double'
..........
---------------------------------------------------------------------------
The gcc compile command used for x86 target is as under:
$ g++ -I "c:\inc" -ansi -mcpu=604 -mstrict-align -ansi -nostdinc -fvolatile
-fno-builtin -fno-for-scope
-mlongcall -DRW_MULTI_THREAD -D_REENTRANT -DCPU=PPC604 -DPRJ_BUILD -O3
-DINCLUDE_CACHE_L2 -DVXWORKS -DPPC
-DDSPBYTECODE -D__GG_IDL_CPP_STATIC__ -D__GGI_IDL_CPP_STATIC__
-fno-exceptions -c -UWIN32 -ffast-math
foo.cpp
Any help on this problem is appreicated.
Thanks,
- Nirav