Index: config.guess
--- config.guess.orig	2006-10-16 05:27:17 +0200
+++ config.guess	2007-05-17 12:16:14 +0200
@@ -192,7 +192,7 @@
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
Index: gcc/config/alpha/osf.h
--- gcc/config/alpha/osf.h.orig	2005-06-25 03:22:41 +0200
+++ gcc/config/alpha/osf.h	2007-05-17 12:16:14 +0200
@@ -78,7 +78,7 @@
    constructor and call-frame data structures are not accidentally
    overridden.  */
 #define LINK_SPEC  \
-  "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
+  "-oldstyle_liblookup %{!o:-o a.out} -G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
    %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
    %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"
 
Index: gcc/config/i386/sol2-10.h
--- gcc/config/i386/sol2-10.h.orig	2006-07-21 07:31:33 +0200
+++ gcc/config/i386/sol2-10.h	2007-07-11 16:23:04 +0200
@@ -82,13 +82,13 @@
              -R /usr/ucblib/64} \
    %{!compat-bsd: \
      %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
-             %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
+             %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}} -rpath-link /lib/64:/usr/lib/64}"
 
 #undef LINK_ARCH64_SPEC
 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
 
 #ifdef TARGET_GNU_LD
-#define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} "
+#define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:} "
 #else
 #define TARGET_LD_EMULATION ""
 #endif
Index: gcc/config/i386/sol2.h
--- gcc/config/i386/sol2.h.orig	2005-06-25 03:22:41 +0200
+++ gcc/config/i386/sol2.h	2007-05-17 12:16:14 +0200
@@ -78,6 +78,9 @@
 #undef ASM_QUAD
 #endif
 
+#undef DEFAULT_PCC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 1
+
 /* The Solaris assembler wants a .local for non-exported aliases.  */
 #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)	\
   do {							\
Index: gcc/config/sol2.h
--- gcc/config/sol2.h.orig	2006-02-07 21:50:37 +0100
+++ gcc/config/sol2.h	2007-05-17 12:16:14 +0200
@@ -143,8 +143,8 @@
   "%{h*} %{v:-V} \
    %{b} \
    %{static:-dn -Bstatic} \
-   %{shared:-G -dy %{!mimpure-text:-z text}} \
-   %{symbolic:-Bsymbolic -G -dy -z text} \
+   %{shared:-G -dy} \
+   %{symbolic:-Bsymbolic -G -dy} \
    %(link_arch) \
    %{Qy:} %{!Qn:-Qy}"
 
Index: gcc/system.h
--- gcc/system.h.orig	2006-03-22 20:36:22 +0100
+++ gcc/system.h	2007-05-17 12:16:14 +0200
@@ -394,10 +394,6 @@
 extern char *strstr (const char *, const char *);
 #endif
 
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
 #if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
 extern void *malloc (size_t);
 #endif
Index: libcpp/charset.c
--- libcpp/charset.c.orig	2005-11-04 00:08:18 +0100
+++ libcpp/charset.c	2007-05-17 12:16:14 +0200
@@ -75,6 +75,7 @@
 #define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1)
 #define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1)
 #define iconv_close(x)   (void)0
+#undef ICONV_CONST
 #define ICONV_CONST
 #endif
 
Index: libcpp/internal.h
--- libcpp/internal.h.orig	2006-02-18 10:25:31 +0100
+++ libcpp/internal.h	2007-05-17 12:16:14 +0200
@@ -33,6 +33,7 @@
 #if HAVE_ICONV
 #include <iconv.h>
 #else
+#undef  HAVE_ICONV
 #define HAVE_ICONV 0
 typedef int iconv_t;  /* dummy */
 #endif
