From: Behan Webster <behanw@converseincode.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com,
charlebm@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: LLVMLinux: Change "extern inline" to "gnu_inline" in ARM ftrace.h
Date: Thu, 05 Sep 2013 21:10:13 -0400 [thread overview]
Message-ID: <52292B75.8080705@converseincode.com> (raw)
In-Reply-To: <20130814224552.GA23006@n2100.arm.linux.org.uk>
Sorry for the delay. A mistake in my email filters ate all your replies.
Doh!
On 08/14/13 18:45, Russell King - ARM Linux wrote:
> On Wed, Aug 14, 2013 at 05:37:41PM -0400, behanw@converseincode.com wrote:
>> -extern inline void *return_address(unsigned int level)
>> +extern inline __attribute__((gnu_inline))
>> +void *return_address(unsigned int level)
> Well, that should be static inline, not extern inline in any case. Does
> clang work if that's static inline?
Actually, neither gcc nor clang work with it merely changed to "static
inline".
Which is why we left it with the explicit GNU89 meaning of "extern
inline" which is gnu_inline. C99 changed the meaning of what "extern
inline" means. One of the major issues we've had with the clang kernel
port is that clang defaults to gnu99 (which is mostly just C99) while
until recently gcc defaulted to gnu89.
For recent versions of gcc:
http://gcc.gnu.org/onlinedocs/gcc/Standards.html
"The default, if no C language dialect options are given, is -std=gnu90;
this will change to -std=gnu99 or -std=gnu11 in some future release when
the C99 or C11 support is complete. Some features that are part of the
C99 standard are accepted as extensions in C90 mode, and some features
that are part of the C11 standard are accepted as extensions in C90 and
C99 modes."
However, having said all that, it seems if I remove the corresponding
NULL definition for return_address in arch/arm/kernel/return_address.c,
I can make it "static inline" and it seems to work for both gcc and clang.
I'll send a new patch. :)
Incidentally the LLVMLinux project tests all the project's patches with
both gcc and clang. The idea is to make it work with both compilers
after all.
Behan
--
Behan Webster
behanw@converseincode.com
prev parent reply other threads:[~2013-09-06 1:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 21:37 [PATCH] Fix extern inline in ftrace.h for ARM behanw
2013-08-14 21:37 ` [PATCH] ARM: LLVMLinux: Change "extern inline" to "gnu_inline" in ARM ftrace.h behanw
2013-08-14 21:51 ` David Daney
2013-08-14 21:56 ` Joe Perches
2013-08-14 22:15 ` Stephen Boyd
2013-08-14 22:45 ` Russell King - ARM Linux
2013-09-06 1:10 ` Behan Webster [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=52292B75.8080705@converseincode.com \
--to=behanw@converseincode.com \
--cc=charlebm@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.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