diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-02-18 16:25:27 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-02-19 08:24:45 +0100 |
commit | 475c6ce87ad8bd1201e4db2e2a7b7caa34778a0f (patch) | |
tree | ebf5b6ef24812bd8507850f923242e6f87b199ae | |
parent | cebc451758d1c2da72db5c4f65c5649ec9a7adcc (diff) | |
download | OSELAS.Toolchain-475c6ce87ad8bd1201e4db2e2a7b7caa34778a0f.tar.gz OSELAS.Toolchain-475c6ce87ad8bd1201e4db2e2a7b7caa34778a0f.tar.xz |
gcc: add fix when building with newer host tools
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | patches/gcc-4.5.2/0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch | 64 | ||||
-rw-r--r-- | patches/gcc-4.5.2/series | 3 | ||||
-rw-r--r-- | patches/gcc-linaro-4.5-2011.02-0/series | 3 |
3 files changed, 70 insertions, 0 deletions
diff --git a/patches/gcc-4.5.2/0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch b/patches/gcc-4.5.2/0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch new file mode 100644 index 0000000..d4a1fb2 --- /dev/null +++ b/patches/gcc-4.5.2/0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch @@ -0,0 +1,64 @@ +From: unknown author <unknown.author@example.com> +Date: Thu, 6 Aug 2015 23:47:06 -0400 +Subject: [PATCH] cfns: fix mismatch in gnu_inline attributes + +Since the 3.0.3 release of gperf (made in May 2007), the generated func +has had the gnu_inline attribute applied to it. The gcc source however +has not been updated to include that which has lead to a mismatch. + +In practice, this hasn't been an issue for two reasons: +(1) Before gcc-5, the default standard was (gnu) C89, and gcc does not +warn or throw an error in this mode. +(2) Starting with gcc-4.8, the compiler driver used to build gcc was +changed to C++, and g++ does not warn or throw an error in this mode. + +This error does show up though when using gcc-5 to build gcc-4.7 or +older as then the default is (gnu) C11 and the C compiler driver is +used. That failure looks like: +In file included from .../gcc-4.7.4/gcc/cp/except.c:990:0: +cfns.gperf: At top level: +cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p' +cfns.gperf:26:14: error: but not here + +Whether the compiler should always emit this error regardless of the +active standard or compiler driver is debatable (I think it should be +consistent -- either always do it or never do it). + +2015-08-06 Mike Frysinger <vapier@gentoo.org> + + * cfns.gperf [__GNUC__, __GNUC_STDC_INLINE__]: Apply the + __gnu_inline__ attribute. + * cfns.h: Regenerated. +--- + gcc/cp/cfns.gperf | 3 +++ + gcc/cp/cfns.h | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index ef1ed08..ba0c487 100644 +--- a/gcc/cp/cfns.gperf ++++ b/gcc/cp/cfns.gperf +@@ -22,6 +22,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + %} +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 62cdfab..2fb9b46 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ diff --git a/patches/gcc-4.5.2/series b/patches/gcc-4.5.2/series index ea6ad6b..a0d0fd4 100644 --- a/patches/gcc-4.5.2/series +++ b/patches/gcc-4.5.2/series @@ -23,3 +23,6 @@ # from upstream 0015-Fix-libjava-cross-build-issue.patch 0016-Fix-ICE-on-ARM.patch + +# fixes +0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch diff --git a/patches/gcc-linaro-4.5-2011.02-0/series b/patches/gcc-linaro-4.5-2011.02-0/series index e070f10..f422051 100644 --- a/patches/gcc-linaro-4.5-2011.02-0/series +++ b/patches/gcc-linaro-4.5-2011.02-0/series @@ -22,3 +22,6 @@ # reverted linaro patch 0016-debian-patch-revert-issue1259.patch + +# fixes +../gcc-4.5.2/0018-cfns-fix-mismatch-in-gnu_inline-attributes.patch |