[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX
From:       Bruno Haible <bruno () clisp ! org>
Date:       2021-02-15 11:08:30
Message-ID: 2117787.sjtJBD9tJU () omega
[Download RAW message or body]

Hi Jeffrey,

> > So, in order to distinguish a 32-bit mode from a 64-bit mode, only the
> > following macros can be used:
> >   - defined in 32-bit mode only: _ILP32 __ILP32__
> >   - defined in 64-bit mode only: _LP64 __LP64__ __64BIT__
> 
> Are you sure that is correct? It almost sounds like the default is
> 32-bit, and you need an option to enable 64-bit.

Yes, for both compilers, 32-bit output is the default, and you need
option '-q64' in order to produce 64-bit output. I verified this using
the command 'file a.out'.

>     compiler mode is set by the value of the
>     OBJECT_MODE environment variable. If the
>     OBJECT_MODE environment variable is also not
>     set, the compiler assumes32-bit compilation mode.

I don't have the environment variable OBJECT_MODE set.

> According to the XL C/C++ manual for AIX (p. 507) [1]:
> 
>     _ARCH_PPC - Indicates that the application is
>     targeted to run on any Power processor.
> 
>     _ARCH_PPC64 - Indicates that the application
>     is targeted to run on Power processors with
>     64-bit support.

The new compiler's behaviour does not contradict this documentation.

Bruno


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic