summaryrefslogtreecommitdiff
path: root/util/crossgcc
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2016-12-04 01:39:44 +0100
committerNico Huber <nico.h@gmx.de>2016-12-06 23:56:05 +0100
commitaa89fb4618987e5c5034f2370381168853cc7308 (patch)
tree43e0afe4acc5b103a3ec071cded8d719e7ff02b7 /util/crossgcc
parentc99526cce9c2f0665cc211f5395c44cf550ed1d5 (diff)
downloadcoreboot-aa89fb4618987e5c5034f2370381168853cc7308.tar.xz
buildgcc: Fix function prototype in GCC
With some newer versions of GCC (experienced with GCC 6.2.1 on Arch- Linux) the first stage of a boostrapping fails due to a mismatching function prototype. Also add a missing `static` to the signature. Change-Id: Ia927036ccd725550f1191890515578bc80c74f80 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/17704 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/crossgcc')
-rw-r--r--util/crossgcc/patches/gcc-5.3.0_libc_name_p.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gcc-5.3.0_libc_name_p.patch b/util/crossgcc/patches/gcc-5.3.0_libc_name_p.patch
new file mode 100644
index 0000000000..98e1802d75
--- /dev/null
+++ b/util/crossgcc/patches/gcc-5.3.0_libc_name_p.patch
@@ -0,0 +1,24 @@
+diff -urp gcc-5.3.0.bak/gcc/cp/cfns.h gcc-5.3.0/gcc/cp/cfns.h
+--- gcc-5.3.0.bak/gcc/cp/cfns.h 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/gcc/cp/cfns.h 2016-12-04 01:33:47.568537831 +0100
+@@ -51,8 +51,12 @@ along with GCC; see the file COPYING3.
+ __inline
+ #endif
+ static unsigned int hash (const char *, unsigned int);
++static
+ #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 */
+@@ -122,6 +126,7 @@ hash (register const char *str, register
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
++static
+ #ifdef __GNUC__
+ __inline
+ #ifdef __GNUC_STDC_INLINE__