Cserzo Miklos wrote:
On Thu, 29 May 2003, Frank Heckenbach wrote:
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 can generate a libgpc in this way but the gpc not seems to make use of it. The objects in the directory are 64-bit mostly but there are a few 32-bit too. (is it normal?)
Oh yeah, probably the C files (rts.o, rts-va.o, file.o). So I think you should set CFLAGS (which will then also apply to PFLAGS, no need to set both). If you set CFLAGS when building the whole compiler, it will also apply to the compiler itself which may or may not be what you want ...
Then I copy the resulting libgpc.a to its place. (Maybe I am a bit naive: "manual installation" means copy or a more complicated operation?)
Yes, just copy it.
Here comes the message generated when I want to use it:
/usr/local/bin/ld: skipping incompatible /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/sparcv9/libgpc.a when searching for -lgpc /usr/local/bin/ld: skipping incompatible /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/libgpc.a when searching for -lgpc /usr/local/bin/ld: cannot find -lgpc GNU ld version 2.13 Supported emulations: elf32_sparc elf64_sparc collect2: ld returned 1 exit status
Unless it's the CFLAGS issue, I don't know. Are the binutils (in particular ar, ld and ranlib) suitable for 64 bits? If different versions of them are needed, you can set them in AR and RANLIB.
On one system I found that ranlib didn't work in the configuration I had and disabling it (by setting RANLIB_TEST=false on the make command line) helped. But that's just a wild guess here.
With some short example code and the resulting assembler file, I might be able to tell something. Does the same happen in C?
The sample goes in the attachment.
What does the assembler file contain (WRT n)?
Frank