Commit b8103112 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

gcc: add support for gcc 4.8



This commit adds support for the recently released gcc 4.8. We re-add
the same patch series as the one used for 4.7.x, after refreshing the
patches.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent e30c5bc5
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
Index: gcc-4.8.0/contrib/regression/objs-gcc.sh
===================================================================
--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh	2009-04-09 17:00:19.000000000 +0200
+++ gcc-4.8.0/contrib/regression/objs-gcc.sh	2013-03-23 17:39:04.000000000 +0100
@@ -106,6 +106,10 @@
  then
   make all-gdb all-dejagnu all-ld || exit 1
   make install-gdb install-dejagnu install-ld || exit 1
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
+ then
+  make all-gdb all-dejagnu all-ld || exit 1
+  make install-gdb install-dejagnu install-ld || exit 1
 elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
   make bootstrap || exit 1
   make install || exit 1
Index: gcc-4.8.0/libjava/classpath/ltconfig
===================================================================
--- gcc-4.8.0.orig/libjava/classpath/ltconfig	2011-02-13 12:45:53.000000000 +0100
+++ gcc-4.8.0/libjava/classpath/ltconfig	2013-03-23 17:39:04.000000000 +0100
@@ -603,7 +603,7 @@
 
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case $host_os in
-linux-gnu*) ;;
+linux-gnu*|linux-uclibc*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
 
@@ -1247,7 +1247,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
+13 −0
Original line number Diff line number Diff line
Index: gcc-4.8.0/boehm-gc/include/gc.h
===================================================================
--- gcc-4.8.0.orig/boehm-gc/include/gc.h	2007-04-23 23:10:09.000000000 +0200
+++ gcc-4.8.0/boehm-gc/include/gc.h	2013-03-23 17:39:20.000000000 +0100
@@ -503,7 +503,7 @@
 #if defined(__linux__) || defined(__GLIBC__)
 # include <features.h>
 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-     && !defined(__ia64__)
+     && !defined(__ia64__) && !defined(__UCLIBC__)
 #   ifndef GC_HAVE_BUILTIN_BACKTRACE
 #     define GC_HAVE_BUILTIN_BACKTRACE
 #   endif
+13 −0
Original line number Diff line number Diff line
Index: gcc-4.8.0/libstdc++-v3/include/c_global/cstdio
===================================================================
--- gcc-4.8.0.orig/libstdc++-v3/include/c_global/cstdio	2013-02-03 18:54:05.000000000 +0100
+++ gcc-4.8.0/libstdc++-v3/include/c_global/cstdio	2013-03-23 17:39:32.000000000 +0100
@@ -138,7 +138,7 @@
   using ::vsprintf;
 } // namespace
 
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99 || defined __UCLIBC__
 
 #undef snprintf
 #undef vfscanf
+49 −0
Original line number Diff line number Diff line
Index: gcc-4.8.0/libmudflap/mf-hooks2.c
===================================================================
--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c	2013-02-03 18:48:05.000000000 +0100
+++ gcc-4.8.0/libmudflap/mf-hooks2.c	2013-03-23 17:39:43.000000000 +0100
@@ -424,7 +424,7 @@
 {
   TRACE ("%s\n", __PRETTY_FUNCTION__);
   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
-  bzero (s, n);
+  memset (s, 0, n);
 }
 
 
@@ -434,7 +434,7 @@
   TRACE ("%s\n", __PRETTY_FUNCTION__);
   MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
   MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
-  bcopy (src, dest, n);
+  memmove (dest, src, n);
 }
 
 
@@ -444,7 +444,7 @@
   TRACE ("%s\n", __PRETTY_FUNCTION__);
   MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
   MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
-  return bcmp (s1, s2, n);
+  return n == 0 ? 0 : memcmp (s1, s2, n);
 }
 
 
@@ -453,7 +453,7 @@
   size_t n = strlen (s);
   TRACE ("%s\n", __PRETTY_FUNCTION__);
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
-  return index (s, c);
+  return strchr (s, c);
 }
 
 
@@ -462,7 +462,7 @@
   size_t n = strlen (s);
   TRACE ("%s\n", __PRETTY_FUNCTION__);
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
-  return rindex (s, c);
+  return strrchr (s, c);
 }
 
 /* XXX:  stpcpy, memccpy */
+30 −0
Original line number Diff line number Diff line
Index: gcc-4.8.0/gcc/config/arm/linux-elf.h
===================================================================
--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h	2013-01-10 21:38:27.000000000 +0100
+++ gcc-4.8.0/gcc/config/arm/linux-elf.h	2013-03-23 17:40:00.000000000 +0100
@@ -55,7 +55,7 @@
    %{shared:-lc} \
    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
 
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+#define LIBGCC_SPEC "-lgcc"
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 
Index: gcc-4.8.0/libgcc/config/arm/t-linux
===================================================================
--- gcc-4.8.0.orig/libgcc/config/arm/t-linux	2012-03-22 16:14:46.000000000 +0100
+++ gcc-4.8.0/libgcc/config/arm/t-linux	2013-03-23 17:40:54.000000000 +0100
@@ -1,6 +1,11 @@
 LIB1ASMSRC = arm/lib1funcs.S
 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-	_ctzsi2 _arm_addsubdf3 _arm_addsubsf3
+	_ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
+	_arm_addsubdf3 _arm_addsubsf3 \
+	_arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
+	_arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
+	_arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
+	_arm_fixsfsi _arm_fixunssfsi
 
 # Just for these, we omit the frame pointer since it makes such a big
 # difference.
Loading