From: Segher Boessenkool <segher@kernel•crashing.org>
To: Nick Desaulniers <ndesaulniers@google•com>
Cc: kernel test robot <lkp@intel•com>,
linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
kbuild-all@lists•01.org,
clang-built-linux <clang-built-linux@googlegroups•com>
Subject: Re: [powerpc:next-test 54/220] arch/powerpc/kernel/vdso32/vgettimeofday.c:13:5: warning: no previous prototype for function '__c_kernel_clock_gettime64'
Date: Mon, 7 Dec 2020 12:20:58 -0600 [thread overview]
Message-ID: <20201207182058.GU2672@gate.crashing.org> (raw)
In-Reply-To: <CAKwvOd=4vu_o3Sr14JwDO6s+tqZWp-DQKWs9So8g2_-zTt+8KA@mail.gmail.com>
On Mon, Dec 07, 2020 at 09:56:56AM -0800, Nick Desaulniers wrote:
> On Mon, Dec 7, 2020 at 4:23 AM Michael Ellerman <mpe@ellerman•id.au> wrote:
> > So is clang defining __powerpc64__ even for 32-bit code?
> >
> > And the answer appears to be yes:
> >
> > $ clang --version
> > Ubuntu clang version 11.0.0-2
> > Target: powerpc64le-unknown-linux-gnu
> >
> > $ clang -m32 -dM -E - < /dev/null | grep powerpc
> > #define __powerpc64__ 1
> > #define __powerpc__ 1
> >
> > Compare to gcc:
> >
> > $ gcc --version
> > gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0
> >
> > $ gcc -m32 -dM -E - < /dev/null | grep powerpc
> > #define __powerpc__ 1
> > #define powerpc 1
> > #define __powerpc 1
> >
> >
> > Which is fairly problematic, because we use the presence/absence of
> > __powerpc64__ to determine if we're building 64-bit/32-bit code in
> > several places.
> >
> > Not sure what the best approach for fixing that is.
>
> Thanks for the triage; we should fix our preprocessor:
> https://bugs.llvm.org/show_bug.cgi?id=48427
Not only is that a compatibility problem (as the bug report says): it is
a straight up violation of the ABI! (For ELFv2, which you have here;
older ABIs did not mention the preprocessor predefines, but this was
exactly the same on all compilers afaik.)
Segher
prev parent reply other threads:[~2020-12-07 18:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 14:23 [powerpc:next-test 54/220] arch/powerpc/kernel/vdso32/vgettimeofday.c:13:5: warning: no previous prototype for function '__c_kernel_clock_gettime64' kernel test robot
2020-12-07 12:23 ` Michael Ellerman
2020-12-07 17:56 ` Nick Desaulniers
2020-12-07 18:20 ` Segher Boessenkool [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207182058.GU2672@gate.crashing.org \
--to=segher@kernel$(echo .)crashing.org \
--cc=clang-built-linux@googlegroups$(echo .)com \
--cc=kbuild-all@lists$(echo .)01.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=lkp@intel$(echo .)com \
--cc=ndesaulniers@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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