Stephen Webb's staging headers patch
David Edelsohn
dje@watson.ibm.com
Thu Jul 19 14:54:00 GMT 2001
>>>>> Benjamin Kosnik writes:
>> Shifting the std_limits.h issue from configure time to build time
>> does not solve the problem on AIX.
Ben> Why? Can you please be specific?
The problem is that a 32-bit AIX system cannot execute a 64-bit
application although the compiler and library produced on the 32-bit
system may be used on a 64-bit system. The 32-bit system provides all of
the libraries and header files -- the only limitation is the chip itself.
There is no distinction between configuring on a 32-bit system and
building on a 32-bit system -- it still is a 32-bit system. One is not
going to configure on a 32-bit system and then switch to a 64-bit system
to compile the library.
>> Given that limits_generic.h utilizes the values from the standard
>> "C" limits.h file, that should work on AIX.
Ben> Hmm. I'd prefer to find a solution that makes AIX like all the other
Ben> native targets, or solve this problem for all the multilibbed hosts at once.
Ben> It sounds to me like you've not tried the staging headers patch. Can you
Ben> do so? You can just drop in libstdc++-v3.head to libstdc++-v3.branch, so
Ben> you can do this with the branch compiler, which should make things easier.
I have tried the staging headers patch. I see the exact same
results as when gen-num-limits was run at configuration time. From my
description above, I am not sure why you expected anything different.
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.
Ben> The question is how to get AIX, and other natively multilibbed hosts,
Ben> to either generate and select the correctly generated file, or do
Ben> something else. I'm not convinced that we can't get the first option to work.
>> Should AIX always claim that it is cross-compiling
Ben> No.
>> should a revised version of my proposed change to try "cross-compiling" if
>> mknumeric_limits failed be used
Ben> Perhaps, but not best case
>> or should we switch to target-dependent std_limits.h like atomicity.h?
Ben> Let's not do this.
If one runs gen-num-limits.cc on any system other than the
intended target (including the specific multilib mode), it may fail. I
see no solution other than falling back to limits_generic.h or a pre-built
target header file. How was the staged header created at build time
suppose to solve this?
Thanks, David
More information about the Libstdc++
mailing list