This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Stephen Webb's staging headers patch



Dav-

Ugh. Ok. Sorry for the confusion: I thought the problem was that the 
std_limits.h file was being created for 64bit targets with 32bit values. 
The real problem appears to be that the 32bit-x-64bit compilers cannot 
execute 64bit apps on 32bit hosts. Sorry if this is just me being dense.

> running mknumeric_limits
> /u/dje/makai/gcc-3.0/gcc/xgcc -B/u/dje/makai/gcc-3.0/gcc/ -B/usr/local/powerpc-ibm-aix4.3.2.0/bin/ -B/usr/local/powerpc-ibm-aix4.3.2.0/lib/ -isystem /usr/local/powerpc-ibm-aix4.3.2.0/include   -maix64 -I/u/dje/makai/gcc-3/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3 -I./powerpc-ibm-aix4.3.3.0/bits/.. -I/u/dje/makai/gcc-3/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3 -fno-exceptions     -o /u/dje/makai/gcc-3/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3/src/gen-num-limits /u/dje/src/GNU/gcc/libstdc++-v3/src/gen-num-limits.cc
> exec(): 0509-036 Cannot load program /u/dje/makai/gcc-3/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3/src/gen-num-limits because of the following errors:
>         0509-032 Cannot run a 64-bit program on a 32-bit machine.
> gen-num-limits failed to execute, exiting.

Aaah. (On the bright side, at least it's erroring out.)

> 	If one runs gen-num-limits.cc on any system other than the
> intended target (including the specific multilib mode), it may fail. 

Right. It's intended for native targets able to run executables.

One problem is that the generic limits file is 32bit, and I 
suppose using it for a 64bit target would be incorrect.

Gaby, do you have any thoughts?

I suppose the following would work and be robust:

Have
1) 16bit generic limits file
2) 32bit generic limits file
3) 64bit generic limits file
(to be honest, Red Hat's already needed a 16bit limits file)

As part of gen_numeric_limits, some kind of check is done to see if 
sizeof(native_int) != sizeof(target_int)

if so, then pick

generic_limits_(sizeof(target_int)) file.


I suppose as part of this, target_includes will have to be multilibbed or 
something, so that the 64bit compiler will find the 64bit limits file, 
and the 32bit compiler will find the 32bit limits file. Ugh. I have no idea 
how to do this part.

David, do you think this would fix it?

I'm trying to finish up some other work right now, so I am unable to do 
this. Hopefully this is pretty clear.

-benjamin



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]