| View previous topic :: View next topic |
| Author |
Message |
spambait
Joined: 17 Apr 2005 Posts: 6
|
Posted: Sun Apr 17, 2005 9:06 pm Post subject: ee-gcc and __LONG_MAX__ |
|
|
The current toolchain from CVS seems to create an ee-gcc which has a wrong __LONG_MAX__ definition, therby breaking <limits.h> and possibly other things.
Please fix by updating the (builtin?) specs. Thanks. |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Sun Apr 17, 2005 9:22 pm Post subject: |
|
|
printf("%X", __LONG_MAX__);
7FFFFFFFFFFFFFFF
which is perfectly correct. _________________ pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department. |
|
| Back to top |
|
 |
spambait
Joined: 17 Apr 2005 Posts: 6
|
Posted: Sun Apr 17, 2005 9:55 pm Post subject: |
|
|
Which compiler flags are you using ? Actually it seems __LONG_MAX__ is not defined at all (see *long_max_spec in ee/lib/gcc-lib/ee/3.2.2/specs).
| Code: |
> cat x.c
#ifndef __LONG_MAX__
#error "1"
#endif
#include <limits.h>
#ifndef __LONG_MAX__
#error "2"
#endif
#if __LONG_MAX__ != 9223372036854775807L
#error "3"
#endif
> /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/bin/ee-gcc -v
Reading specs from /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/lib/gcc-lib/ee/3.2.2/specs
Configured with: ../configure --prefix=/opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee --target=ee --enable-languages=c,c++ --with-newlib --with-headers=/opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/ee/include --enable-cxx-flags=-G0
Thread model: single
gcc version 3.2.2
> /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/bin/ee-gcc -c x.c
x.c:2:2: #error "1"
x.c:9:2: #error "3"
|
|
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Sun Apr 17, 2005 10:18 pm Post subject: |
|
|
ee-gcc -D__LONG_MAX__=9223372036854775807L of course.
Seriously: update your toolchain (both gcc and ps2sdk) using cvs sources. _________________ pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department. |
|
| Back to top |
|
 |
spambait
Joined: 17 Apr 2005 Posts: 6
|
Posted: Sun Apr 17, 2005 10:30 pm Post subject: |
|
|
| My toolchain is from 20050412, which includes the latest CVS ps2toolchain/gcc-3.2.2.patch from Apr 09. Is there any newer version ? |
|
| Back to top |
|
 |
spambait
Joined: 17 Apr 2005 Posts: 6
|
Posted: Sun Apr 17, 2005 10:57 pm Post subject: |
|
|
| Ok, I've just seen your glimits.h update to gcc-3.2.2 CVS, and while I'm not sure what you mean with "command line setup" in your CVS comment I still think that the specs should be fixed. Anyway, many thanks. |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Sun Apr 17, 2005 11:33 pm Post subject: |
|
|
The right command line would be -isystem $PS2SDK/common/include _________________ pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department. |
|
| Back to top |
|
 |
cory1492
Joined: 10 Dec 2004 Posts: 216
|
Posted: Sun Apr 17, 2005 11:44 pm Post subject: |
|
|
| Quote: | | Ho well, let's have that into the toolchain as well, so that people who REALLY do not know how to set up command line options will be happy. |
You werent talking about me were you? LOL thanks pixel! |
|
| Back to top |
|
 |
|