This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler


> There is currently a philosophical problem with hppa*64* at the moment.
> At the moment, HPUX has three possible versions for PA2.0 capable
> systems, that is hppa2.0, hppa2.0n and hppa2.0w.  Now hppa2.0 == hppa2.0n
> but hppa2.0w indicates the OS can *execute* 64bit code.  This has nothing
> to do with the current build environment.  Now the 2.0N vs 2.0W comes from
> both the .level in PA assembly and more importantly the architecture flags
> in cc (ie CC +DA2.0N vs CC +DA2.0W).  However, to go back and stay hppa2.0w
> == 64 build

More precisely, they descibe the PA architecture and data model of the OS.
The hppa2.0w OS architecture is LP64 and it supports two very distinct ABIs.
The default is ILP32 (this is equivalent to using the +DA1.1 option with
the HP compiler--this option is the default).  The other is the 64-bit
LP64 ABI which is equivalent to the +DA2.0W compiler option.  It is
possible other data models may be supported in the future (ILP32_OFFBIG,
LPBIG_OFFBIG).

When the 64-bit GNU tools were developed a few years ago, a decision was
made to use "hppa64" to select the PA2.0-LP64 tools.  The other alternative
would have been to use "hppa2.0w" plus a configure option like
--with-abi=LP64.  The principal reason for not using the second alternative
is that the two ABIs supported under HP-UX 11 are totally different and
require completely separate tools, libraries, etc.  HP provided wrappers for
their tools but this isn't possible with the GNU tools.  It's also
simpler to just use "hppa64", particularly if config.guess did an ABI
check of the compiler.

> environment rather than hppa2.0w == 64 capable OS may potentially break a
> very large amount of code, and it would have to cleared though the gcc and
> binutils groups.

Yes.  I don't favor changing to the second alternative.  Note that "hppa64"
is accepted by config.sub for selecting the optional ABI.

> How about the following (example)
> 
> cpu_host=`if echo "__LP64__" | $CC -E - | grep -q __LP64__; then echo
> hppa2.0n; else echo hppa2.0w; fi`

Looks reasonable.  Note CCOPTS may affect the result when using the
HP compiler.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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