From: Ben Hutchings <ben@decadent.org.uk>
To: Brian Gerst <brgerst@gmail.com>, Ingo Molnar <mingo@kernel.org>
Cc: the arch/x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] x86: uapi: Fix __BITS_PER_LONG for x32
Date: Thu, 01 Oct 2015 21:54:18 +0100 [thread overview]
Message-ID: <1443732858.2730.66.camel@decadent.org.uk> (raw)
In-Reply-To: <CAMzpN2iRLgfEALJcOxVJ7c65oMS-Mu3hfq8gq+HrS+GnnNQ9dQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Thu, 2015-10-01 at 09:02 -0400, Brian Gerst wrote:
> On Thu, Oct 1, 2015 at 4:23 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Ben Hutchings <ben@decadent.org.uk> wrote:
> >
> > > diff --git a/arch/x86/include/uapi/asm/bitsperlong.h
> > > b/arch/x86/include/uapi/asm/bitsperlong.h
> > > index b0ae1c4..217909b 100644
> > > --- a/arch/x86/include/uapi/asm/bitsperlong.h
> > > +++ b/arch/x86/include/uapi/asm/bitsperlong.h
> > > @@ -1,7 +1,7 @@
> > > #ifndef __ASM_X86_BITSPERLONG_H
> > > #define __ASM_X86_BITSPERLONG_H
> > >
> > > -#ifdef __x86_64__
> > > +#if defined(__x86_64__) && !defined(__ILP32__)
> > > # define __BITS_PER_LONG 64
> >
> > Can we write this as:
> >
> > #ifdef __ILP64__
Assuming you meant __LP64__...
> Do all versions of gcc/clang define that, even if x32 isn't
> supported?
For gcc, it's been defined since 2003 (gcc 3.3):
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0bdab2d89e28ca4dc84f8f0fafed85a4822bca49
For clang, it's been defined since before its first public release:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?r1=38978&r2=38987&pathrev=161685
So gcc 3.1 and 3.2 didn't define it, but everything newer does.
Ben.
--
Ben Hutchings
Knowledge is power. France is bacon.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-10-01 20:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 0:40 [PATCH] x86: uapi: Fix __BITS_PER_LONG for x32 Ben Hutchings
2015-10-01 8:23 ` Ingo Molnar
2015-10-01 13:02 ` Brian Gerst
2015-10-01 20:54 ` Ben Hutchings [this message]
2015-10-02 1:52 ` Ben Hutchings
2015-10-02 7:45 ` [tip:x86/urgent] x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds tip-bot for Ben Hutchings
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443732858.2730.66.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=a.p.zijlstra@chello.nl \
--cc=brgerst@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/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 NNTP newsgroup(s).