Cserzo Miklos wrote:
I need 64-bit code on Sun Solaris 2.9. The specification of the system (gpc -v):
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/specs Configured with: /users/cserzo/big/src/gcc-3.2.1/configure --enable-languages=pascal --disable-nls --with-gnu-as --with-gnu-ld --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld Thread model: posix gpc version 20030507, based on gcc-3.2.1
Apparently, the 32-bit compiler should be able to generate 64-bit code. The problem is the missing 64-bit libgpc. The 64-bit version of the gcc library is there but its gpc counterpart not. How could I force the compilation of this library at build time?
I don't have any experience myself with this situation, but provided there is an option to switch to 64 bit code, try adding it to PFLAGS on the make command line (you might need to call make from the gcc/ directory).
You can also configure and build the runtime library on its own, mostly like an ordinary library (in the p/rts directory). This not well tested and "undocumented", and you'll have to install the compiled library manually. Note that this requires the exactly matching GPC compiler already installed (or set in PC).
I made another test. With the 32-bit version one should be able to address ~ 4.3 Gb of the memory. In practice, I can allocate about 2Gb (array[1..500000000] of integer) but not much more. If I compile a code containing array[1..600000000] of integer the following error generated:
/var/tmp//ccrvtgAm.s: Assembler messages: /var/tmp//ccrvtgAm.s:7: Error: .COMMon length (-1894967300.) <0! Ignored. /var/tmp//ccrvtgAm.s:7: Warning: rest of line ignored; first ignored character is `,'
With some short example code and the resulting assembler file, I might be able to tell something. Does the same happen in C?
Frank