bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: noloader@gmail.com
Cc: bug-gnulib@gnu.org
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	[thread overview]
Message-ID: <2117787.sjtJBD9tJU@omega> (raw)
In-Reply-To: <CAH8yC8kX5CCbaxO20sjFboFQab=cySd1cNqokK8ezFD0vh2G8w@mail.gmail.com>

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	other threads:[~2021-02-15 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15  2:50 Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX Bruno Haible
2021-02-15  3:29 ` Jeffrey Walton
2021-02-15 11:08   ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2117787.sjtJBD9tJU@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=noloader@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).