diff options
author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2015-09-23 10:34:56 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-24 17:54:24 +0100 |
commit | 6d1447ba2d8b1c76fd1f0d26aee250fb82cbeddd (patch) | |
tree | 28ec958accc097066d80676379345f5f01dbcb0c /meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch | |
parent | 42dc9024d8e659c64d21dbf8032a6e527b184343 (diff) | |
download | poky-6d1447ba2d8b1c76fd1f0d26aee250fb82cbeddd.tar.gz |
gmp: Use __gnu_inline__ attribute in 4.2.1
gcc 5 defaults to C11 rules about "extern inline": this breaks
any code that includes gmp.h header from gmp 4.2.1 with 'multiple
definition' errors.
disable-stdc patch is no longer required because of this.
(From OE-Core rev: e03d95d70f8bfe57c258d270ac6b3331650dbc10)
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch')
-rw-r--r-- | meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch b/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch new file mode 100644 index 0000000000..627d71aba9 --- /dev/null +++ b/meta/recipes-support/gmp/gmp-4.2.1/Use-__gnu_inline__-attribute.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 3cb33502bafd04b8ad4ca3454fab16d5ff313297 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Tue, 22 Sep 2015 13:16:23 +0300 | ||
4 | Subject: [PATCH] Use __gnu_inline__ attribute | ||
5 | |||
6 | gcc5 uses C11 inline rules. This means the old "extern inline" | ||
7 | semantics are not available without a special attribute. | ||
8 | |||
9 | See: https://gcc.gnu.org/gcc-5/porting_to.html | ||
10 | |||
11 | Upstream-Status: Inappropriate [Fixed in current versions] | ||
12 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
13 | --- | ||
14 | gmp-h.in | 5 ++++- | ||
15 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/gmp-h.in b/gmp-h.in | ||
18 | index eed6fe4..361dd1d 100644 | ||
19 | --- a/gmp-h.in | ||
20 | +++ b/gmp-h.in | ||
21 | @@ -419,8 +419,11 @@ typedef __mpq_struct *mpq_ptr; | ||
22 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | ||
23 | for an inline too, so as to correctly specify "dllimport" on windows, in | ||
24 | case the function is called rather than inlined. */ | ||
25 | + | ||
26 | +/* Use __gnu_inline__ attribute: later gcc uses different "extern inline" | ||
27 | + behaviour */ | ||
28 | #ifdef __GNUC__ | ||
29 | -#define __GMP_EXTERN_INLINE extern __inline__ | ||
30 | +#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | ||
31 | #define __GMP_INLINE_PROTOTYPES 1 | ||
32 | #endif | ||
33 | |||
34 | -- | ||
35 | 2.1.4 | ||
36 | |||