Patch gcc to support building under gcc 5

Note that as this patch modifies both the gperf and resulting header,
there is a possibility that Make will want to rebuild the header from
the gperf source, so we need to add gperf to our package listing.
This commit is contained in:
Kevin Lange 2016-08-29 12:42:29 +09:00
parent d91d1bfc57
commit 062019e76c
3 changed files with 28 additions and 1 deletions

View File

@ -19,6 +19,7 @@ addons:
- pkg-config
- git
- expect
- gperf
cache:
- apt
- directories:

View File

@ -107,3 +107,29 @@ diff -rupN original/gcc/gengtype.c new/gcc/gengtype.c
newv = *v;
newv.type = field_type;
diff -rupN original/gcc/cp/cfns.h new/gcc/cp/cfns.h
--- original/gcc/cp/cfns.h
+++ new/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 -rupN original/gcc/cp/cfns.gperf new/gcc/cp/cfns.gperf
--- original/gcc/cp/cfns.gperf
+++ new/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);
%}

View File

@ -24,7 +24,7 @@ if [[ "$INSTALL_PACKAGES" == "true" ]] ; then
echo "If you don't want to do this and you're sure you have all of the required system packages, then interrupt the password prompt and run this script again with -q."
if [ -f /etc/debian_version ]; then
sudo apt-get install yasm genext2fs build-essential wget libmpfr-dev libmpc-dev libgmp3-dev qemu autoconf automake texinfo pkg-config git ctags
sudo apt-get install yasm genext2fs build-essential wget libmpfr-dev libmpc-dev libgmp3-dev qemu autoconf automake texinfo pkg-config git ctags gperf
elif [ -f /etc/fedora-release ]; then
sudo yum groupinstall 'Development Tools'
sudo yum groupinstall 'Development Libraries'