Displaying 20 results from an estimated 30 matches for "gnu_inline".
2018 Jun 07
0
[PATCH v3 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
...ompiler-gcc.h
[]
> @@ -72,17 +72,22 @@
> * -Wunused-function. This turns out to avoid the need for complex #ifdef
> * directives. Suppress the warning in clang as well by using "unused"
> * function attribute, which is redundant but not harmful for gcc.
> + * Prefer gnu_inline, so that extern inline functions do not emit an
> + * externally visible function. This makes extern inline behave as per gnu89
> + * semantics rather than c99. This prevents multiple symbol definition errors
> + * of extern inline functions at link time.
> */
> #if !defined(CONFI...
2018 Jul 18
0
Patch "compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations" has been added to the 4.4-stable tree
This is a note to let you know that I've just added the patch titled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
compiler-gcc.h-add-__attribute__-gnu_inline-to-all-inline-declarations.patch
and it can be found in the...
2018 Jul 18
0
Patch "compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
compiler-gcc.h-add-__attribute__-gnu_inline-to-all-inline-declarations.patch
and it can be found in th...
2018 Jul 18
0
Patch "compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations" has been added to the 4.17-stable tree
This is a note to let you know that I've just added the patch titled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
to the 4.17-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
compiler-gcc.h-add-__attribute__-gnu_inline-to-all-inline-declarations.patch
and it can be found in th...
2018 Jul 18
0
Patch "compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations" has been added to the 4.9-stable tree
This is a note to let you know that I've just added the patch titled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
compiler-gcc.h-add-__attribute__-gnu_inline-to-all-inline-declarations.patch
and it can be found in the...
2018 Jun 06
0
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
On June 6, 2018 1:05:45 AM PDT, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>Hi,
>
>when discovering 'gnu_inline', I found ...
>
>$ git grep -w __FORTIFY_INLINE
>include/linux/string.h:#define __FORTIFY_INLINE extern __always_inline
>__attribute__((gnu_inline))
>include/linux/string.h:__FORTIFY_INLINE char *strncpy(char *p, const
>char *q, __kernel_size_t size)
>include/linux/string....
2018 Jul 20
0
[PATCH 4.4 04/31] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...-Hartman <gregkh at linuxfoundation.org>
---
include/linux/compiler-gcc.h | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -65,25 +65,40 @@
#endif
/*
+ * Feature detection for gnu_inline (gnu89 extern inline semantics). Either
+ * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
+ * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
+ * defined so the gnu89 semantics are the default.
+ */
+#ifdef __GNUC_STDC_INLINE__
+# define __gnu_inlin...
2018 Jul 20
0
[PATCH 4.9 05/66] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...-Hartman <gregkh at linuxfoundation.org>
---
include/linux/compiler-gcc.h | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -65,25 +65,40 @@
#endif
/*
+ * Feature detection for gnu_inline (gnu89 extern inline semantics). Either
+ * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
+ * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
+ * defined so the gnu89 semantics are the default.
+ */
+#ifdef __GNUC_STDC_INLINE__
+# define __gnu_inlin...
2018 Jul 20
0
[PATCH 4.14 01/92] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...-Hartman <gregkh at linuxfoundation.org>
---
include/linux/compiler-gcc.h | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -66,25 +66,40 @@
#endif
/*
+ * Feature detection for gnu_inline (gnu89 extern inline semantics). Either
+ * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
+ * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
+ * defined so the gnu89 semantics are the default.
+ */
+#ifdef __GNUC_STDC_INLINE__
+# define __gnu_inlin...
2018 Jul 20
0
[PATCH 4.17 001/101] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...-Hartman <gregkh at linuxfoundation.org>
---
include/linux/compiler-gcc.h | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -66,25 +66,40 @@
#endif
/*
+ * Feature detection for gnu_inline (gnu89 extern inline semantics). Either
+ * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
+ * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
+ * defined so the gnu89 semantics are the default.
+ */
+#ifdef __GNUC_STDC_INLINE__
+# define __gnu_inlin...
2018 Jun 12
0
[PATCH v4 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
...aced with e.g. -x c++, objective-c, assembler-with-cpp etc.
>
> Neat, I'll have to bookmark that incantation. I can s/gcc/clang/ to
> get a similar list (which is how I know it supports
> __GCC_STDC_INLINE__).>
I bet that if you add -fgnu89-inlines then it *does* define
__GNUC_GNU_INLINE__.
>
> Patch now becomes something like:
>
> #ifdef __GNUC_GNU_INLINE__
> #define __gnu_inline __attribute__((gnu_inline))
> #else
> #define __gnu_inline
> #endif
>
> #define inline inline __attribute__((always_inline, unused)) notrace
> __gnu_inline
> ...
&g...
2018 Jun 12
0
[PATCH v4 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
...for cc-version dependencies.
>
>Those will be helpful. If we want to pursue compiler flags, which get
>set some Makefiles, then yes. But I think a simpler change to my
>patch would be as below.
>
>It seems gcc did not get __has_attribute [0] until 5.1, but will
>define __GNUC_GNU_INLINE__ if supported. [1] Unfortunately, Clang
>does not define __GNUC_GNU_INLINE__ [2]. So a proper feature test
>might look like:
>
>```
>#ifndef __has_attribute
>#define __has_attribute(x) 0
>#endif
>
>#if defined(__GNUC_GNU_INLINE__) || __has_attribute(gnu_inline)
>#de...
2018 Jun 08
0
[PATCH v4 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
On Thu, Jun 7, 2018 at 10:49 PM, Nick Desaulniers
<ndesaulniers at google.com> wrote:
> Functions marked extern inline do not emit an externally visible
> function when the gnu89 C standard is used. Some KBUILD Makefiles
> overwrite KBUILD_CFLAGS. This is an issue for GCC 5.1+ users as without
> an explicit C standard specified, the default is gnu11. Since c99, the
> semantics
2018 Jun 05
0
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
On Tue, 2018-06-05 at 12:50 -0700, Nick Desaulniers wrote:
> On Tue, Jun 5, 2018 at 12:14 PM Joe Perches <joe at perches.com> wrote:
> >
> > On Tue, 2018-06-05 at 10:23 -0700, Joe Perches wrote:
> > > Perhaps these are simpler as
> > >
> > > #define __inline__ inline
> > > #define __inline inline
> >
> > Currently,
2018 Jun 05
3
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
...ompiler-gcc.h
[]
> @@ -72,17 +72,24 @@
> * -Wunused-function. This turns out to avoid the need for complex #ifdef
> * directives. Suppress the warning in clang as well by using "unused"
> * function attribute, which is redundant but not harmful for gcc.
> + * Prefer gnu_inline, so that extern inline functions do not emit an
> + * externally visible function. This makes extern inline behave as per gnu89
> + * semantics rather than c99. This prevents multiple symbol definition errors
> + * of extern inline functions at link time.
> */
> #if !defined(CONFI...
2018 Jun 05
3
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
...ompiler-gcc.h
[]
> @@ -72,17 +72,24 @@
> * -Wunused-function. This turns out to avoid the need for complex #ifdef
> * directives. Suppress the warning in clang as well by using "unused"
> * function attribute, which is redundant but not harmful for gcc.
> + * Prefer gnu_inline, so that extern inline functions do not emit an
> + * externally visible function. This makes extern inline behave as per gnu89
> + * semantics rather than c99. This prevents multiple symbol definition errors
> + * of extern inline functions at link time.
> */
> #if !defined(CONFI...
2015 Aug 21
2
[cfe-dev] [RFC] AlwaysInline codegen
...n to think that they’re actually
> available externally, and there’s zero benefit to the optimizer from this
> information because inlining is forced anyway, so this lie is both terrible
> and pointless.
>
The interesting case is a declaration like this:
extern inline __attribute__((gnu_inline, always_inline)) void f() {
/*...*/ }
These are common in the glibc headers, and they mean:
1) This is a body just for inlining, and there is a strong definition
provided elsewhere (gnu_inline + extern inline), probably with an entirely
different body.
2) If you see a direct call to this function...
2018 Nov 05
2
[Bug 1289] New: iptables build fails with kernel 4.20-rc1 - gnu_inline attributes
https://bugzilla.netfilter.org/show_bug.cgi?id=1289
Bug ID: 1289
Summary: iptables build fails with kernel 4.20-rc1 - gnu_inline
attributes
Product: iptables
Version: unspecified
Hardware: x86_64
OS: Ubuntu
Status: NEW
Severity: normal
Priority: P5
Component: iptables
Assignee: netfilter-buglog at lists.netf...
2018 Jun 19
0
[PATCH v5 0/3] extern inline native_save_fl for paravirt
...BUILD_CFLAGS, which is *extremely
> problematic* for extern inline, as the sematics are completely the
> opposite depending on what C standard is used.
> http://blahg.josefsipek.net/?p=529
>
> Changes since v4:
> Take Arnd's and hpa's suggestions properly feature detect gnu_inline
> attribute to support gcc 4.1.
>
> Changes since v3:
> Take Joe's suggestion to hoist __inline__ and __inline out of
> conditional block.
>
> Changes since v2:
> Take hpa's _ASM_ARG patch into the set in order to simplify cross
> 32b/64b x86 assembly...
2018 Jun 05
1
[PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline
...nk time for subdirs that override KBUILD_CFLAGS (making the C standard
> used implicit) regardless of this patch. This has been cleaned up
> earlier in the patch set, but is left as a note in the commit message
> for future travelers.
I think the keyword you are missing is
__attribute__((gnu_inline))
which forces the gnu89 behavior on all compiler versions. It's been supported
since gcc-4.2, so it should not cause problems on any compiler that is able
to build an x86 kernel.
Arnd