From 127dbc6822a7107d068b26b9c3a391042e8ad154 Mon Sep 17 00:00:00 2001 From: INVENT Date: Thu, 1 Oct 2015 18:45:53 +0300 Subject: [PATCH] Build fix for GCC 5 --- build.sh | 1 + fix-gcc5-build.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 fix-gcc5-build.patch diff --git a/build.sh b/build.sh index b2995f8..d49ff14 100755 --- a/build.sh +++ b/build.sh @@ -62,6 +62,7 @@ unpack_source $(basename $NEWLIB_SRC) #unpack_source $(basename $INSIGHT_SRC) # Patch for texinfo5. Adapted from Marcello Pogliani patch -p1 < ../gcc-texinfo5.patch +patch -p1 < ../fix-gcc5-build.patch ) # Set the PATH to include the binaries we're going to build. diff --git a/fix-gcc5-build.patch b/fix-gcc5-build.patch new file mode 100644 index 0000000..d3bc64f --- /dev/null +++ b/fix-gcc5-build.patch @@ -0,0 +1,22 @@ +--- src/gcc-4.5.2/gcc/cp/cfns.h.orig 2015-02-13 08:27:46.000000000 +0200 ++++ src/gcc-4.5.2/gcc/cp/cfns.h 2015-02-13 10:23:53.000000000 +0200 +@@ -53,6 +53,9 @@ + 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 */ +@@ -96,7 +99,7 @@ + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400 + }; +- register int hval = len; ++ register int hval = (int)len; + + switch (hval) + { +