bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX


From: Bruno Haible
Subject: Re: Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX
Date: Mon, 15 Feb 2021 12:08:30 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-201-generic; KDE/5.18.0; x86_64; ; )

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]