add support for gcc v4.3.1 & v4.3.2 (closes: #3479), thanks to Luigi Mantellini!
authorNicolas Thill <nico@openwrt.org>
Wed, 21 Jan 2009 11:58:17 +0000 (11:58 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 21 Jan 2009 11:58:17 +0000 (11:58 +0000)
SVN-Revision: 14131

35 files changed:
toolchain/gcc/Config.in
toolchain/gcc/Config.version
toolchain/gcc/Makefile
toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/105-libtool.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/995-short-enums.diff [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.1/999-coldfire.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/104-gnuhurd-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/105-libtool.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/301-missing-execinfo_h.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/302-c99-snprintf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/305-libmudflap-susv3-legacy.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/810-arm-softfloat-libgcc.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/910-mbsd_multi.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/993-arm_insn-opinit-RTX_CODE-fixup.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/995-short-enums.diff [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/998-gcc-4.3.0-fix-header.00.patch [new file with mode: 0644]
toolchain/gcc/patches/4.3.2/999-coldfire.patch [new file with mode: 0644]
toolchain/glibc/patches/2.6.1/101-binutils_2_19.patch [new file with mode: 0644]
toolchain/glibc/patches/2.6.1/102-gcc_4_3.patch [new file with mode: 0644]
toolchain/glibc/patches/2.7/101-binutils_2_19.patch [new file with mode: 0644]
toolchain/glibc/patches/2.7/102-gcc_4_3.patch [new file with mode: 0644]
toolchain/uClibc/patches/910-gcc_4_3_include_fixed.patch [new file with mode: 0644]
tools/Makefile
tools/gmp/Makefile [new file with mode: 0644]
tools/mpfr/Makefile [new file with mode: 0644]

index accf06aee462078f1d452a5664f1b883c93efe52..8d91ba2c5425560a3bf385e681f68649d4d196d8 100644 (file)
@@ -22,6 +22,14 @@ choice
                depends !LINUX_2_4
                bool "gcc 4.2.4"
 
+       config GCC_VERSION_4_3_1
+               depends !LINUX_2_4
+               bool "gcc 4.3.1"
+
+       config GCC_VERSION_4_3_2
+               depends !LINUX_2_4
+               bool "gcc 4.3.2"
+
 endchoice
 
 config EABI_SUPPORT
index 30c5c29a320d76584dbd0d0a5c3d260d08e441f4..e822445bd688af3bac65af19f39cdd6da28fa99a 100644 (file)
@@ -3,8 +3,38 @@ config GCC_VERSION
        default "3.4.6"     if GCC_VERSION_3_4_6
        default "4.1.2"     if GCC_VERSION_4_1_2
        default "4.2.4"     if GCC_VERSION_4_2_4
+       default "4.3.1"     if GCC_VERSION_4_3_1
+       default "4.3.2"     if GCC_VERSION_4_3_2
        default "4.1.2"
 
+config GCC_VERSION_3
+       bool
+       default y       if GCC_VERSION_3_4_6
+
+config GCC_VERSION_3_4
+       bool
+       default y       if GCC_VERSION_3_4_6
+       
+config GCC_VERSION_4
+       bool
+       default y       if GCC_VERSION_4_1_2
+       default y       if GCC_VERSION_4_2_4
+       default y       if GCC_VERSION_4_3_1
+       default y       if GCC_VERSION_4_3_2
+
+config GCC_VERSION_4_1
+       bool
+       default y       if GCC_VERSION_4_1_2
+
+config GCC_VERSION_4_2
+       bool
+       default y       if GCC_VERSION_4_2_4
+
+config GCC_VERSION_4_3
+       bool
+       default y       if GCC_VERSION_4_3_1
+       default y       if GCC_VERSION_4_3_2
+
 if !TOOLCHAINOPTS
        config GCC_VERSION_3_4_6
                default y if LINUX_2_4
index 5e8bb9abb36b55cb827e6e87a1c31852bd167760..9a364eb8e152d3066c93a32cc84c53674b4615d6 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
 # Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
 # Copyright (C) 2005-2006 Felix Fietkau <nbd@openwrt.org>
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,6 +35,12 @@ endif
 ifeq ($(PKG_VERSION),4.2.4)
   PKG_MD5SUM:=d79f553e7916ea21c556329eacfeaa16
 endif
+ifeq ($(PKG_VERSION),4.3.1)
+  PKG_MD5SUM:=4afa0290cc3a41ac8822666f1110de98
+endif
+ifeq ($(PKG_VERSION),4.3.2)
+  PKG_MD5SUM:=5dfac5da961ecd5f227c3175859a486d
+endif
 
 PATCH_DIR=./patches/$(PKG_VERSION)
 
@@ -63,12 +69,21 @@ GCC_CONFIGURE_COMMON:= \
                --target=$(REAL_GNU_TARGET_NAME) \
                --with-gnu-ld \
                --enable-target-optspace \
+               --disable-libgomp \
                --disable-libmudflap \
                --disable-multilib \
                --disable-nls \
                $(SOFT_FLOAT_CONFIG_OPTION) \
                $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
 
+ifneq ($(CONFIG_GCC_VERSION_4_3),)
+       GCC_BUILD_TARGET_LIBGCC:=y
+       GCC_CONFIGURE_COMMON+= \
+               --with-gmp=$(TOPDIR)/staging_dir/host \
+               --with-mpfr=$(TOPDIR)/staging_dir/host \
+               --disable-decimal-float
+endif
+
 ifneq ($(CONFIG_SSP_SUPPORT),)
        GCC_CONFIGURE_COMMON+= \
                --enable-libssp
@@ -96,7 +111,6 @@ GCC_CONFIGURE_STAGE0:= \
                --with-newlib \
                --without-headers \
                --enable-languages=c \
-               --disable-libgomp \
                --disable-libssp \
                --disable-shared \
                --disable-threads \
@@ -151,11 +165,18 @@ define Stage1/Configure
 endef
 
 define Stage1/Compile
-       $(GCC_MAKE) -C $(PKG_BUILD_DIR1) all-build-libiberty all-gcc
+       $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
+       $(GCC_MAKE) -C $(PKG_BUILD_DIR1) \
+               all-build-libiberty \
+               all-gcc \
+               $(if $(GCC_BUILD_TARGET_LIBGCC),all-target-libgcc)
 endef
 
 define Stage1/Install
-       $(GCC_MAKE) -C $(PKG_BUILD_DIR1) install-gcc
+       $(GCC_MAKE) -C $(PKG_BUILD_DIR1) \
+               install-gcc \
+               $(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
+       
        # XXX: glibc insists on linking against libgcc_eh
        ( cd $(TOOLCHAIN_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
                [ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
diff --git a/toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch b/toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..cca8c82
--- /dev/null
@@ -0,0 +1,33 @@
+--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
++++ gcc/contrib/regression/objs-gcc.sh
+@@ -105,6 +105,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
+--- gcc/libjava/classpath/ltconfig
++++ gcc/libjava/classpath/ltconfig
+@@ -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
+@@ -1251,7 +1251,7 @@
+   ;;
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
diff --git a/toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch b/toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..c04dd9f
--- /dev/null
@@ -0,0 +1,13 @@
+diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
+--- gcc-4.2.1.oorig/gcc/config.gcc     2007-10-01 11:52:52.000000000 +0200
++++ gcc-4.2.1/gcc/config.gcc   2007-10-01 13:22:12.000000000 +0200
+@@ -494,6 +494,9 @@ case ${target} in
+     alpha*)
+       tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
+       ;;
++    i[34567]86-*hurd*-*)
++      tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
++      ;;
+     i[34567]86-*-*)
+       tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
+       ;;
diff --git a/toolchain/gcc/patches/4.3.1/105-libtool.patch b/toolchain/gcc/patches/4.3.1/105-libtool.patch
new file mode 100644 (file)
index 0000000..015f28d
--- /dev/null
@@ -0,0 +1,84 @@
+2008-03-02  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       Backport from upstream Libtool:
+
+       2007-10-12  Eric Blake  <ebb9@byu.net>
+
+       Deal with Autoconf 2.62's semantic change in m4_append.
+       * ltsugar.m4 (lt_append): Replace broken versions of
+       m4_append.
+       (lt_if_append_uniq): Don't require separator to be overquoted, and
+       avoid broken m4_append.
+       (lt_dict_add): Fix typo.
+       * libtool.m4 (_LT_DECL): Don't overquote separator.
+
+diff --git a/libtool.m4 b/libtool.m4
+index e86cd02..26a039a 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -319,7 +319,7 @@ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+ # VARNAME.  Any other value will be used directly.
+ m4_define([_LT_DECL],
+-[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
++[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+       [m4_ifval([$1], [$1], [$2])])
+     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+diff --git a/ltsugar.m4 b/ltsugar.m4
+index fc51dc7..dd4f871 100644
+--- a/ltsugar.m4
++++ b/ltsugar.m4
+@@ -1,13 +1,13 @@
+ # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+ #
+-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+ # Written by Gary V. Vaughan.
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+-# serial 3 ltsugar.m4
++# serial 4 ltsugar.m4
+ # This is to help aclocal find these macros, as it can't see m4_define.
+ AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+@@ -46,6 +46,20 @@ m4_define([lt_cdr],
+ m4_define([lt_unquote], $1)
++# lt_append(MACRO-NAME, STRING, [SEPARATOR])
++# ------------------------------------------
++# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
++# Note that neither SEPARATOR nor STRING are expanded.  No SEPARATOR is
++# output if MACRO-NAME was previously undefined (different than defined
++# and empty).
++# This macro is needed until we can rely on Autoconf 2.62, since earlier
++# versions of m4 mistakenly expanded SEPARATOR.
++m4_define([lt_append],
++[m4_define([$1],
++         m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
++
++
++
+ # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+ # ----------------------------------------------------------
+ # Produce a SEP delimited list of all paired combinations of elements of
+@@ -67,10 +81,10 @@ m4_define([lt_combine],
+ # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+ m4_define([lt_if_append_uniq],
+ [m4_ifdef([$1],
+-      [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
+-              [$5],
+-          [m4_append([$1], [$2], [$3])$4])],
+-    [m4_append([$1], [$2], [$3])$4])])
++        [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
++               [lt_append([$1], [$2], [$3])$4],
++               [$5])],
++    [lt_append([$1], [$2], [$3])$4])])
+ # lt_dict_add(DICT, KEY, VALUE)
+
diff --git a/toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch b/toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch
new file mode 100644 (file)
index 0000000..0e2092f
--- /dev/null
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig       2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h    2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # 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
diff --git a/toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch b/toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch
new file mode 100644 (file)
index 0000000..ba51a0e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio
+===================================================================
+--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio     (revision 129202)
++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio     (working copy)
+@@ -144,7 +144,7 @@
+ _GLIBCXX_END_NAMESPACE
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
+ #undef snprintf
+ #undef vfscanf
diff --git a/toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch
new file mode 100644 (file)
index 0000000..374b1f8
--- /dev/null
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c     (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c     (working copy)
+@@ -427,7 +427,7 @@
+ {
+   TRACE ("%s\n", __PRETTY_FUNCTION__);
+   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+-  bzero (s, n);
++  memset (s, 0, n);
+ }
+@@ -437,7 +437,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);
+ }
+@@ -447,7 +447,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);
+ }
+@@ -456,7 +456,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);
+ }
+@@ -465,7 +465,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 */
diff --git a/toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch
new file mode 100644 (file)
index 0000000..1639c39
--- /dev/null
@@ -0,0 +1,29 @@
+Index: gcc-4.3.0/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/t-linux   (revision 129896)
++++ gcc-4.3.0/gcc/config/arm/t-linux   (working copy)
+@@ -3,7 +3,10 @@
+ TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++      _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++      _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++      _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+Index: gcc-4.3.0/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/linux-elf.h       (revision 129896)
++++ gcc-4.3.0/gcc/config/arm/linux-elf.h       (working copy)
+@@ -48,7 +62,7 @@
+    %{shared:-lc} \
+    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
diff --git a/toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch b/toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch
new file mode 100644 (file)
index 0000000..481367f
--- /dev/null
@@ -0,0 +1,284 @@
+
+       This patch brings over a few features from MirBSD:
+       * -fhonour-copts
+         If this option is not given, it's warned (depending
+         on environment variables). This is to catch errors
+         of misbuilt packages which override CFLAGS themselves.
+       * -Werror-maybe-reset
+         Has the effect of -Wno-error if GCC_NO_WERROR is
+         set and not '0', a no-operation otherwise. This is
+         to be able to use -Werror in "make" but prevent
+         GNU autoconf generated configure scripts from
+         freaking out.
+       * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks
+         the default for -O2/-Os, because they trigger gcc bugs
+         and can delete code with security implications.
+
+       This patch was authored by Thorsten Glaser <tg at mirbsd.de>
+       with copyright assignment to the FSF in effect.
+
+Index: gcc-4.3.0/gcc/c-opts.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/c-opts.c        2007-07-31 02:27:12.007256629 +0200
++++ gcc-4.3.0/gcc/c-opts.c     2007-07-31 02:27:39.324813371 +0200
+@@ -108,6 +108,9 @@
+ /* Number of deferred options scanned for -include.  */
+ static size_t include_cursor;
+
++/* Check if a port honours COPTS.  */
++static int honour_copts = 0;
++
+ static void set_Wimplicit (int);
+ static void handle_OPT_d (const char *);
+ static void set_std_cxx98 (int);
+@@ -462,6 +465,14 @@
+       enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
+       break;
+
++    case OPT_Werror_maybe_reset:
++      {
++      char *ev = getenv ("GCC_NO_WERROR");
++      if ((ev != NULL) && (*ev != '0'))
++        cpp_opts->warnings_are_errors = 0;
++      }
++      break;
++
+     case OPT_Wformat:
+       set_Wformat (value);
+       break;
+@@ -708,6 +719,12 @@
+       flag_exceptions = value;
+       break;
+
++    case OPT_fhonour_copts:
++      if (c_language == clk_c) {
++      honour_copts++;
++      }
++      break;
++
+     case OPT_fimplement_inlines:
+       flag_implement_inlines = value;
+       break;
+@@ -1248,6 +1265,47 @@
+   /* Has to wait until now so that cpplib has its hash table.  */
+   init_pragma ();
+
++  if (c_language == clk_c) {
++    char *ev = getenv ("GCC_HONOUR_COPTS");
++    int evv;
++    if (ev == NULL)
++      evv = -1;
++    else if ((*ev == '0') || (*ev == '\0'))
++      evv = 0;
++    else if (*ev == '1')
++      evv = 1;
++    else if (*ev == '2')
++      evv = 2;
++    else if (*ev == 's')
++      evv = -1;
++    else {
++      warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
++      evv = 1; /* maybe depend this on something like MIRBSD_NATIVE?  */
++    }
++    if (evv == 1) {
++      if (honour_copts == 0) {
++      error ("someone does not honour COPTS at all in lenient mode");
++      return false;
++      } else if (honour_copts != 1) {
++      warning (0, "someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++      }
++    } else if (evv == 2) {
++      if (honour_copts == 0) {
++      error ("someone does not honour COPTS at all in strict mode");
++      return false;
++      } else if (honour_copts != 1) {
++      error ("someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++      return false;
++      }
++    } else if (evv == 0) {
++      if (honour_copts != 1)
++      inform ("someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++    }
++  }
++
+   return true;
+ }
+
+Index: gcc-4.3.0/gcc/c.opt
+===================================================================
+--- gcc-4.3.0.orig/gcc/c.opt   2007-07-31 02:27:12.015257093 +0200
++++ gcc-4.3.0/gcc/c.opt        2007-07-31 02:27:39.328813597 +0200
+@@ -207,6 +207,10 @@
+ C ObjC RejectNegative Warning
+ This switch is deprecated; use -Werror=implicit-function-declaration instead
+
++Werror-maybe-reset
++C ObjC C++ ObjC++
++; Documented in common.opt
++
+ Wfloat-equal
+ C ObjC C++ ObjC++ Var(warn_float_equal) Warning
+ Warn if testing floating point numbers for equality
+@@ -590,6 +594,9 @@
+ fhonor-std
+ C++ ObjC++
+
++fhonour-copts
++C ObjC C++ ObjC++ RejectNegative
++
+ fhosted
+ C ObjC
+ Assume normal C execution environment
+Index: gcc-4.3.0/gcc/common.opt
+===================================================================
+--- gcc-4.3.0.orig/gcc/common.opt      2007-07-31 02:27:12.023257546 +0200
++++ gcc-4.3.0/gcc/common.opt   2007-07-31 02:27:39.360815422 +0200
+@@ -102,6 +102,10 @@
+ Common Joined
+ Treat specified warning as error
+
++Werror-maybe-reset
++Common
++If environment variable GCC_NO_WERROR is set, act as -Wno-error
++
+ Wextra
+ Common Warning
+ Print extra (possibly unwanted) warnings
+@@ -528,6 +532,9 @@
+ Common Report Var(flag_guess_branch_prob) Optimization
+ Enable guessing of branch probabilities
+
++fhonour-copts
++Common RejectNegative
++
+ ; Nonzero means ignore `#ident' directives.  0 means handle them.
+ ; Generate position-independent code for executables if possible
+ ; On SVR4 targets, it also controls whether or not to emit a
+Index: gcc-4.3.0/gcc/opts.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/opts.c  2007-07-31 02:27:12.031257991 +0200
++++ gcc-4.3.0/gcc/opts.c       2007-07-31 02:28:36.320061346 +0200
+@@ -830,9 +830,6 @@
+       flag_schedule_insns_after_reload = 1;
+ #endif
+       flag_regmove = 1;
+-      flag_strict_aliasing = 1;
+-      flag_strict_overflow = 1;
+-      flag_delete_null_pointer_checks = 1;
+       flag_reorder_blocks = 1;
+       flag_reorder_functions = 1;
+       flag_tree_store_ccp = 1;
+@@ -850,6 +847,10 @@
+
+   if (optimize >= 3)
+     {
++      flag_strict_aliasing = 1;
++      flag_strict_overflow = 1;
++      flag_delete_null_pointer_checks = 1;
++
+       flag_predictive_commoning = 1;
+       flag_inline_functions = 1;
+       flag_unswitch_loops = 1;
+@@ -1441,6 +1442,17 @@
+       enable_warning_as_error (arg, value, lang_mask);
+       break;
+
++    case OPT_Werror_maybe_reset:
++      {
++      char *ev = getenv ("GCC_NO_WERROR");
++      if ((ev != NULL) && (*ev != '0'))
++        warnings_are_errors = 0;
++      }
++      break;
++
++    case OPT_fhonour_copts:
++      break;
++
+     case OPT_Wextra:
+       set_Wextra (value);
+       break;
+Index: gcc-4.3.0/gcc/doc/cppopts.texi
+===================================================================
+--- gcc-4.3.0.orig/gcc/doc/cppopts.texi        2007-07-31 02:27:12.039258455 +0200
++++ gcc-4.3.0/gcc/doc/cppopts.texi     2007-07-31 02:27:39.408818157 +0200
+@@ -168,6 +168,11 @@
+ Make all warnings into hard errors.  Source code which triggers warnings
+ will be rejected.
+
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
+ @item -Wsystem-headers
+ @opindex Wsystem-headers
+ Issue warnings for code in system headers.  These are normally unhelpful
+Index: gcc-4.3.0/gcc/doc/invoke.texi
+===================================================================
+--- gcc-4.3.0.orig/gcc/doc/invoke.texi 2007-07-31 02:27:12.047258920 +0200
++++ gcc-4.3.0/gcc/doc/invoke.texi      2007-07-31 02:29:13.218164047 +0200
+@@ -233,7 +233,7 @@
+ -Wconversion  -Wcoverage-mismatch  -Wno-deprecated-declarations @gol
+ -Wdisabled-optimization  -Wno-div-by-zero  @gol
+ -Wempty-body  -Wno-endif-labels @gol
+--Werror  -Werror=* @gol
++-Werror  -Werror=* -Werror-maybe-reset @gol
+ -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
+ -Wno-format-extra-args -Wformat-nonliteral @gol
+ -Wformat-security  -Wformat-y2k -Wignored-qualifiers @gol
+@@ -4030,6 +4030,22 @@
+ @option{-Wall} and by @option{-pedantic}, which can be disabled with
+ @option{-Wno-pointer-sign}.
+
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
++ at item -fhonour-copts
++ at opindex fhonour-copts
++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
++given at least once, and warn if it is given more than once.
++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
++given exactly once.
++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
++is not given exactly once.
++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
++This flag and environment variable only affect the C language.
++
+ @item -Wstack-protector
+ @opindex Wstack-protector
+ @opindex Wno-stack-protector
+@@ -5490,7 +5806,7 @@
+ second branch or a point immediately following it, depending on whether
+ the condition is known to be true or false.
+
+-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
++Enabled at levels @option{-O3}.
+
+ @item -fsplit-wide-types
+ @opindex fsplit-wide-types
+@@ -5635,7 +5514,7 @@
+ @option{-fno-delete-null-pointer-checks} to disable this optimization
+ for programs which depend on that behavior.
+
+-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
++Enabled at levels @option{-O3}.
+
+ @item -fexpensive-optimizations
+ @opindex fexpensive-optimizations
+Index: gcc-4.3.0/gcc/java/jvspec.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/java/jvspec.c   2007-07-31 02:27:12.055259364 +0200
++++ gcc-4.3.0/gcc/java/jvspec.c        2007-07-31 02:27:39.484822490 +0200
+@@ -670,6 +670,7 @@
+      class name.  Append dummy `.c' that can be stripped by set_input so %b
+      is correct.  */
+   set_input (concat (main_class_name, "main.c", NULL));
++  putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack!  */
+   err = do_spec (jvgenmain_spec);
+   if (err == 0)
+     {
diff --git a/toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch b/toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
new file mode 100644 (file)
index 0000000..69f0c37
--- /dev/null
@@ -0,0 +1,41 @@
+gcc/ChangeLog
+2007-11-27  Bernhard Fischer  <>
+
+       * config/arm/arm-protos.h (arm_vector_mode_supported_p,
+       arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
+       function prototypes in RTX_CODE.
+       * genopinit.c: Include tm_p.h.
+
+Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/arm-protos.h      (revision 130463)
++++ gcc-4.3.0/gcc/config/arm/arm-protos.h      (working copy)
+@@ -40,15 +40,14 @@
+                                                              unsigned int);
+ extern unsigned int arm_dbx_register_number (unsigned int);
+ extern void arm_output_fn_unwind (FILE *, bool);
+-  
+ #ifdef TREE_CODE
+ extern int arm_return_in_memory (const_tree);
+ #endif
+-#ifdef RTX_CODE
+ extern bool arm_vector_mode_supported_p (enum machine_mode);
+ extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
+ extern int const_ok_for_arm (HOST_WIDE_INT);
++#ifdef RTX_CODE
+ extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
+                              HOST_WIDE_INT, rtx, rtx, int);
+ extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
+Index: gcc-4.3.0/gcc/genopinit.c
+===================================================================
+--- gcc-4.3.0/gcc/genopinit.c  (revision 130463)
++++ gcc-4.3.0/gcc/genopinit.c  (working copy)
+@@ -486,6 +486,7 @@
+   printf ("#include \"expr.h\"\n");
+   printf ("#include \"optabs.h\"\n");
+   printf ("#include \"reload.h\"\n\n");
++  printf ("#include \"tm_p.h\"\n\n");
+   printf ("void\ninit_all_optabs (void)\n{\n");
diff --git a/toolchain/gcc/patches/4.3.1/995-short-enums.diff b/toolchain/gcc/patches/4.3.1/995-short-enums.diff
new file mode 100644 (file)
index 0000000..03c470c
--- /dev/null
@@ -0,0 +1,42 @@
+see gcc PR34205
+Index: gcc-4.3.0/gcc/tree.h
+===================================================================
+--- gcc-4.3.0/gcc/tree.h       (revision 130511)
++++ gcc-4.3.0/gcc/tree.h       (working copy)
+@@ -38,6 +38,7 @@
+   LAST_AND_UNUSED_TREE_CODE   /* A convenient way to get a value for
+                                  NUM_TREE_CODES.  */
++  ,__LAST_AND_UNUSED_TREE_CODE=32767 /* Force 16bit width.  */
+ };
+ #undef DEFTREECODE
+Index: gcc-4.3.0/gcc/rtl.h
+===================================================================
+--- gcc-4.3.0/gcc/rtl.h        (revision 130511)
++++ gcc-4.3.0/gcc/rtl.h        (working copy)
+@@ -48,9 +48,11 @@
+ #include "rtl.def"            /* rtl expressions are documented here */
+ #undef DEF_RTL_EXPR
+-  LAST_AND_UNUSED_RTX_CODE};  /* A convenient way to get a value for
++  LAST_AND_UNUSED_RTX_CODE    /* A convenient way to get a value for
+                                  NUM_RTX_CODE.
+                                  Assumes default enum value assignment.  */
++  ,__LAST_AND_UNUSED_RTX_CODE=32767 /* Force 16bit width.  */
++};
+ #define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
+                               /* The cast here, saves many elsewhere.  */
+Index: gcc-4.3.0/gcc/c-common.h
+===================================================================
+--- gcc-4.3.0/gcc/c-common.h   (revision 130511)
++++ gcc-4.3.0/gcc/c-common.h   (working copy)
+@@ -125,6 +125,7 @@
+   RID_LAST_AT = RID_AT_IMPLEMENTATION,
+   RID_FIRST_PQ = RID_IN,
+   RID_LAST_PQ = RID_ONEWAY
++  ,__LAST_AND_UNUSED_RID=32767 /* Force 16bit width.  */
+ };
+ #define OBJC_IS_AT_KEYWORD(rid) \
diff --git a/toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch b/toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch
new file mode 100644 (file)
index 0000000..7fe59d2
--- /dev/null
@@ -0,0 +1,15 @@
+\\\\
+\\ gcc PR33200
+Index: gcc-4.3.0/gcc/config.gcc
+===================================================================
+--- gcc-4.3.0/gcc/config.gcc   (revision 131628)
++++ gcc-4.3.0/gcc/config.gcc   (working copy)
+@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
+       if test x${enable_incomplete_targets} = xyes ; then
+               tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
+       fi
+-      use_fixproto=yes
++      # XXX: why? use_fixproto=yes
+       ;;
+ sh-*-rtemscoff*)
+       tmake_file="sh/t-sh t-rtems sh/t-rtems"
diff --git a/toolchain/gcc/patches/4.3.1/999-coldfire.patch b/toolchain/gcc/patches/4.3.1/999-coldfire.patch
new file mode 100644 (file)
index 0000000..2968e8d
--- /dev/null
@@ -0,0 +1,10 @@
+--- gcc-4.3.1/gcc/config.gcc.old       2008-06-17 23:49:00.000000000 +0200
++++ gcc-4.3.1/gcc/config.gcc   2008-06-17 23:03:07.000000000 +0200
+@@ -1630,6 +1630,7 @@
+       if test x$sjlj != x1; then
+           tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
+       fi
++      tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
+       ;;
+ m68k-*-rtems*)
+       default_m68k_cpu=68020
diff --git a/toolchain/gcc/patches/4.3.2/100-uclibc-conf.patch b/toolchain/gcc/patches/4.3.2/100-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..cca8c82
--- /dev/null
@@ -0,0 +1,33 @@
+--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
++++ gcc/contrib/regression/objs-gcc.sh
+@@ -105,6 +105,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
+--- gcc/libjava/classpath/ltconfig
++++ gcc/libjava/classpath/ltconfig
+@@ -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
+@@ -1251,7 +1251,7 @@
+   ;;
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
diff --git a/toolchain/gcc/patches/4.3.2/104-gnuhurd-uclibc-conf.patch b/toolchain/gcc/patches/4.3.2/104-gnuhurd-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..c04dd9f
--- /dev/null
@@ -0,0 +1,13 @@
+diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
+--- gcc-4.2.1.oorig/gcc/config.gcc     2007-10-01 11:52:52.000000000 +0200
++++ gcc-4.2.1/gcc/config.gcc   2007-10-01 13:22:12.000000000 +0200
+@@ -494,6 +494,9 @@ case ${target} in
+     alpha*)
+       tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
+       ;;
++    i[34567]86-*hurd*-*)
++      tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
++      ;;
+     i[34567]86-*-*)
+       tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
+       ;;
diff --git a/toolchain/gcc/patches/4.3.2/105-libtool.patch b/toolchain/gcc/patches/4.3.2/105-libtool.patch
new file mode 100644 (file)
index 0000000..015f28d
--- /dev/null
@@ -0,0 +1,84 @@
+2008-03-02  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       Backport from upstream Libtool:
+
+       2007-10-12  Eric Blake  <ebb9@byu.net>
+
+       Deal with Autoconf 2.62's semantic change in m4_append.
+       * ltsugar.m4 (lt_append): Replace broken versions of
+       m4_append.
+       (lt_if_append_uniq): Don't require separator to be overquoted, and
+       avoid broken m4_append.
+       (lt_dict_add): Fix typo.
+       * libtool.m4 (_LT_DECL): Don't overquote separator.
+
+diff --git a/libtool.m4 b/libtool.m4
+index e86cd02..26a039a 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -319,7 +319,7 @@ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+ # VARNAME.  Any other value will be used directly.
+ m4_define([_LT_DECL],
+-[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
++[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+       [m4_ifval([$1], [$1], [$2])])
+     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+diff --git a/ltsugar.m4 b/ltsugar.m4
+index fc51dc7..dd4f871 100644
+--- a/ltsugar.m4
++++ b/ltsugar.m4
+@@ -1,13 +1,13 @@
+ # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+ #
+-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+ # Written by Gary V. Vaughan.
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+-# serial 3 ltsugar.m4
++# serial 4 ltsugar.m4
+ # This is to help aclocal find these macros, as it can't see m4_define.
+ AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+@@ -46,6 +46,20 @@ m4_define([lt_cdr],
+ m4_define([lt_unquote], $1)
++# lt_append(MACRO-NAME, STRING, [SEPARATOR])
++# ------------------------------------------
++# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
++# Note that neither SEPARATOR nor STRING are expanded.  No SEPARATOR is
++# output if MACRO-NAME was previously undefined (different than defined
++# and empty).
++# This macro is needed until we can rely on Autoconf 2.62, since earlier
++# versions of m4 mistakenly expanded SEPARATOR.
++m4_define([lt_append],
++[m4_define([$1],
++         m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
++
++
++
+ # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+ # ----------------------------------------------------------
+ # Produce a SEP delimited list of all paired combinations of elements of
+@@ -67,10 +81,10 @@ m4_define([lt_combine],
+ # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+ m4_define([lt_if_append_uniq],
+ [m4_ifdef([$1],
+-      [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
+-              [$5],
+-          [m4_append([$1], [$2], [$3])$4])],
+-    [m4_append([$1], [$2], [$3])$4])])
++        [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
++               [lt_append([$1], [$2], [$3])$4],
++               [$5])],
++    [lt_append([$1], [$2], [$3])$4])])
+ # lt_dict_add(DICT, KEY, VALUE)
+
diff --git a/toolchain/gcc/patches/4.3.2/301-missing-execinfo_h.patch b/toolchain/gcc/patches/4.3.2/301-missing-execinfo_h.patch
new file mode 100644 (file)
index 0000000..0e2092f
--- /dev/null
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig       2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h    2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # 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
diff --git a/toolchain/gcc/patches/4.3.2/302-c99-snprintf.patch b/toolchain/gcc/patches/4.3.2/302-c99-snprintf.patch
new file mode 100644 (file)
index 0000000..ba51a0e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio
+===================================================================
+--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio     (revision 129202)
++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio     (working copy)
+@@ -144,7 +144,7 @@
+ _GLIBCXX_END_NAMESPACE
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
+ #undef snprintf
+ #undef vfscanf
diff --git a/toolchain/gcc/patches/4.3.2/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/patches/4.3.2/305-libmudflap-susv3-legacy.patch
new file mode 100644 (file)
index 0000000..374b1f8
--- /dev/null
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c     (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c     (working copy)
+@@ -427,7 +427,7 @@
+ {
+   TRACE ("%s\n", __PRETTY_FUNCTION__);
+   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+-  bzero (s, n);
++  memset (s, 0, n);
+ }
+@@ -437,7 +437,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);
+ }
+@@ -447,7 +447,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);
+ }
+@@ -456,7 +456,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);
+ }
+@@ -465,7 +465,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 */
diff --git a/toolchain/gcc/patches/4.3.2/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/4.3.2/810-arm-softfloat-libgcc.patch
new file mode 100644 (file)
index 0000000..1639c39
--- /dev/null
@@ -0,0 +1,29 @@
+Index: gcc-4.3.0/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/t-linux   (revision 129896)
++++ gcc-4.3.0/gcc/config/arm/t-linux   (working copy)
+@@ -3,7 +3,10 @@
+ TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++      _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++      _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++      _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+Index: gcc-4.3.0/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/linux-elf.h       (revision 129896)
++++ gcc-4.3.0/gcc/config/arm/linux-elf.h       (working copy)
+@@ -48,7 +62,7 @@
+    %{shared:-lc} \
+    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
diff --git a/toolchain/gcc/patches/4.3.2/910-mbsd_multi.patch b/toolchain/gcc/patches/4.3.2/910-mbsd_multi.patch
new file mode 100644 (file)
index 0000000..481367f
--- /dev/null
@@ -0,0 +1,284 @@
+
+       This patch brings over a few features from MirBSD:
+       * -fhonour-copts
+         If this option is not given, it's warned (depending
+         on environment variables). This is to catch errors
+         of misbuilt packages which override CFLAGS themselves.
+       * -Werror-maybe-reset
+         Has the effect of -Wno-error if GCC_NO_WERROR is
+         set and not '0', a no-operation otherwise. This is
+         to be able to use -Werror in "make" but prevent
+         GNU autoconf generated configure scripts from
+         freaking out.
+       * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks
+         the default for -O2/-Os, because they trigger gcc bugs
+         and can delete code with security implications.
+
+       This patch was authored by Thorsten Glaser <tg at mirbsd.de>
+       with copyright assignment to the FSF in effect.
+
+Index: gcc-4.3.0/gcc/c-opts.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/c-opts.c        2007-07-31 02:27:12.007256629 +0200
++++ gcc-4.3.0/gcc/c-opts.c     2007-07-31 02:27:39.324813371 +0200
+@@ -108,6 +108,9 @@
+ /* Number of deferred options scanned for -include.  */
+ static size_t include_cursor;
+
++/* Check if a port honours COPTS.  */
++static int honour_copts = 0;
++
+ static void set_Wimplicit (int);
+ static void handle_OPT_d (const char *);
+ static void set_std_cxx98 (int);
+@@ -462,6 +465,14 @@
+       enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
+       break;
+
++    case OPT_Werror_maybe_reset:
++      {
++      char *ev = getenv ("GCC_NO_WERROR");
++      if ((ev != NULL) && (*ev != '0'))
++        cpp_opts->warnings_are_errors = 0;
++      }
++      break;
++
+     case OPT_Wformat:
+       set_Wformat (value);
+       break;
+@@ -708,6 +719,12 @@
+       flag_exceptions = value;
+       break;
+
++    case OPT_fhonour_copts:
++      if (c_language == clk_c) {
++      honour_copts++;
++      }
++      break;
++
+     case OPT_fimplement_inlines:
+       flag_implement_inlines = value;
+       break;
+@@ -1248,6 +1265,47 @@
+   /* Has to wait until now so that cpplib has its hash table.  */
+   init_pragma ();
+
++  if (c_language == clk_c) {
++    char *ev = getenv ("GCC_HONOUR_COPTS");
++    int evv;
++    if (ev == NULL)
++      evv = -1;
++    else if ((*ev == '0') || (*ev == '\0'))
++      evv = 0;
++    else if (*ev == '1')
++      evv = 1;
++    else if (*ev == '2')
++      evv = 2;
++    else if (*ev == 's')
++      evv = -1;
++    else {
++      warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
++      evv = 1; /* maybe depend this on something like MIRBSD_NATIVE?  */
++    }
++    if (evv == 1) {
++      if (honour_copts == 0) {
++      error ("someone does not honour COPTS at all in lenient mode");
++      return false;
++      } else if (honour_copts != 1) {
++      warning (0, "someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++      }
++    } else if (evv == 2) {
++      if (honour_copts == 0) {
++      error ("someone does not honour COPTS at all in strict mode");
++      return false;
++      } else if (honour_copts != 1) {
++      error ("someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++      return false;
++      }
++    } else if (evv == 0) {
++      if (honour_copts != 1)
++      inform ("someone does not honour COPTS correctly, passed %d times",
++       honour_copts);
++    }
++  }
++
+   return true;
+ }
+
+Index: gcc-4.3.0/gcc/c.opt
+===================================================================
+--- gcc-4.3.0.orig/gcc/c.opt   2007-07-31 02:27:12.015257093 +0200
++++ gcc-4.3.0/gcc/c.opt        2007-07-31 02:27:39.328813597 +0200
+@@ -207,6 +207,10 @@
+ C ObjC RejectNegative Warning
+ This switch is deprecated; use -Werror=implicit-function-declaration instead
+
++Werror-maybe-reset
++C ObjC C++ ObjC++
++; Documented in common.opt
++
+ Wfloat-equal
+ C ObjC C++ ObjC++ Var(warn_float_equal) Warning
+ Warn if testing floating point numbers for equality
+@@ -590,6 +594,9 @@
+ fhonor-std
+ C++ ObjC++
+
++fhonour-copts
++C ObjC C++ ObjC++ RejectNegative
++
+ fhosted
+ C ObjC
+ Assume normal C execution environment
+Index: gcc-4.3.0/gcc/common.opt
+===================================================================
+--- gcc-4.3.0.orig/gcc/common.opt      2007-07-31 02:27:12.023257546 +0200
++++ gcc-4.3.0/gcc/common.opt   2007-07-31 02:27:39.360815422 +0200
+@@ -102,6 +102,10 @@
+ Common Joined
+ Treat specified warning as error
+
++Werror-maybe-reset
++Common
++If environment variable GCC_NO_WERROR is set, act as -Wno-error
++
+ Wextra
+ Common Warning
+ Print extra (possibly unwanted) warnings
+@@ -528,6 +532,9 @@
+ Common Report Var(flag_guess_branch_prob) Optimization
+ Enable guessing of branch probabilities
+
++fhonour-copts
++Common RejectNegative
++
+ ; Nonzero means ignore `#ident' directives.  0 means handle them.
+ ; Generate position-independent code for executables if possible
+ ; On SVR4 targets, it also controls whether or not to emit a
+Index: gcc-4.3.0/gcc/opts.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/opts.c  2007-07-31 02:27:12.031257991 +0200
++++ gcc-4.3.0/gcc/opts.c       2007-07-31 02:28:36.320061346 +0200
+@@ -830,9 +830,6 @@
+       flag_schedule_insns_after_reload = 1;
+ #endif
+       flag_regmove = 1;
+-      flag_strict_aliasing = 1;
+-      flag_strict_overflow = 1;
+-      flag_delete_null_pointer_checks = 1;
+       flag_reorder_blocks = 1;
+       flag_reorder_functions = 1;
+       flag_tree_store_ccp = 1;
+@@ -850,6 +847,10 @@
+
+   if (optimize >= 3)
+     {
++      flag_strict_aliasing = 1;
++      flag_strict_overflow = 1;
++      flag_delete_null_pointer_checks = 1;
++
+       flag_predictive_commoning = 1;
+       flag_inline_functions = 1;
+       flag_unswitch_loops = 1;
+@@ -1441,6 +1442,17 @@
+       enable_warning_as_error (arg, value, lang_mask);
+       break;
+
++    case OPT_Werror_maybe_reset:
++      {
++      char *ev = getenv ("GCC_NO_WERROR");
++      if ((ev != NULL) && (*ev != '0'))
++        warnings_are_errors = 0;
++      }
++      break;
++
++    case OPT_fhonour_copts:
++      break;
++
+     case OPT_Wextra:
+       set_Wextra (value);
+       break;
+Index: gcc-4.3.0/gcc/doc/cppopts.texi
+===================================================================
+--- gcc-4.3.0.orig/gcc/doc/cppopts.texi        2007-07-31 02:27:12.039258455 +0200
++++ gcc-4.3.0/gcc/doc/cppopts.texi     2007-07-31 02:27:39.408818157 +0200
+@@ -168,6 +168,11 @@
+ Make all warnings into hard errors.  Source code which triggers warnings
+ will be rejected.
+
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
+ @item -Wsystem-headers
+ @opindex Wsystem-headers
+ Issue warnings for code in system headers.  These are normally unhelpful
+Index: gcc-4.3.0/gcc/doc/invoke.texi
+===================================================================
+--- gcc-4.3.0.orig/gcc/doc/invoke.texi 2007-07-31 02:27:12.047258920 +0200
++++ gcc-4.3.0/gcc/doc/invoke.texi      2007-07-31 02:29:13.218164047 +0200
+@@ -233,7 +233,7 @@
+ -Wconversion  -Wcoverage-mismatch  -Wno-deprecated-declarations @gol
+ -Wdisabled-optimization  -Wno-div-by-zero  @gol
+ -Wempty-body  -Wno-endif-labels @gol
+--Werror  -Werror=* @gol
++-Werror  -Werror=* -Werror-maybe-reset @gol
+ -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
+ -Wno-format-extra-args -Wformat-nonliteral @gol
+ -Wformat-security  -Wformat-y2k -Wignored-qualifiers @gol
+@@ -4030,6 +4030,22 @@
+ @option{-Wall} and by @option{-pedantic}, which can be disabled with
+ @option{-Wno-pointer-sign}.
+
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
++ at item -fhonour-copts
++ at opindex fhonour-copts
++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
++given at least once, and warn if it is given more than once.
++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
++given exactly once.
++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
++is not given exactly once.
++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
++This flag and environment variable only affect the C language.
++
+ @item -Wstack-protector
+ @opindex Wstack-protector
+ @opindex Wno-stack-protector
+@@ -5490,7 +5806,7 @@
+ second branch or a point immediately following it, depending on whether
+ the condition is known to be true or false.
+
+-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
++Enabled at levels @option{-O3}.
+
+ @item -fsplit-wide-types
+ @opindex fsplit-wide-types
+@@ -5635,7 +5514,7 @@
+ @option{-fno-delete-null-pointer-checks} to disable this optimization
+ for programs which depend on that behavior.
+
+-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
++Enabled at levels @option{-O3}.
+
+ @item -fexpensive-optimizations
+ @opindex fexpensive-optimizations
+Index: gcc-4.3.0/gcc/java/jvspec.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/java/jvspec.c   2007-07-31 02:27:12.055259364 +0200
++++ gcc-4.3.0/gcc/java/jvspec.c        2007-07-31 02:27:39.484822490 +0200
+@@ -670,6 +670,7 @@
+      class name.  Append dummy `.c' that can be stripped by set_input so %b
+      is correct.  */
+   set_input (concat (main_class_name, "main.c", NULL));
++  putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack!  */
+   err = do_spec (jvgenmain_spec);
+   if (err == 0)
+     {
diff --git a/toolchain/gcc/patches/4.3.2/993-arm_insn-opinit-RTX_CODE-fixup.patch b/toolchain/gcc/patches/4.3.2/993-arm_insn-opinit-RTX_CODE-fixup.patch
new file mode 100644 (file)
index 0000000..69f0c37
--- /dev/null
@@ -0,0 +1,41 @@
+gcc/ChangeLog
+2007-11-27  Bernhard Fischer  <>
+
+       * config/arm/arm-protos.h (arm_vector_mode_supported_p,
+       arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
+       function prototypes in RTX_CODE.
+       * genopinit.c: Include tm_p.h.
+
+Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
+===================================================================
+--- gcc-4.3.0/gcc/config/arm/arm-protos.h      (revision 130463)
++++ gcc-4.3.0/gcc/config/arm/arm-protos.h      (working copy)
+@@ -40,15 +40,14 @@
+                                                              unsigned int);
+ extern unsigned int arm_dbx_register_number (unsigned int);
+ extern void arm_output_fn_unwind (FILE *, bool);
+-  
+ #ifdef TREE_CODE
+ extern int arm_return_in_memory (const_tree);
+ #endif
+-#ifdef RTX_CODE
+ extern bool arm_vector_mode_supported_p (enum machine_mode);
+ extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
+ extern int const_ok_for_arm (HOST_WIDE_INT);
++#ifdef RTX_CODE
+ extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
+                              HOST_WIDE_INT, rtx, rtx, int);
+ extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
+Index: gcc-4.3.0/gcc/genopinit.c
+===================================================================
+--- gcc-4.3.0/gcc/genopinit.c  (revision 130463)
++++ gcc-4.3.0/gcc/genopinit.c  (working copy)
+@@ -486,6 +486,7 @@
+   printf ("#include \"expr.h\"\n");
+   printf ("#include \"optabs.h\"\n");
+   printf ("#include \"reload.h\"\n\n");
++  printf ("#include \"tm_p.h\"\n\n");
+   printf ("void\ninit_all_optabs (void)\n{\n");
diff --git a/toolchain/gcc/patches/4.3.2/995-short-enums.diff b/toolchain/gcc/patches/4.3.2/995-short-enums.diff
new file mode 100644 (file)
index 0000000..03c470c
--- /dev/null
@@ -0,0 +1,42 @@
+see gcc PR34205
+Index: gcc-4.3.0/gcc/tree.h
+===================================================================
+--- gcc-4.3.0/gcc/tree.h       (revision 130511)
++++ gcc-4.3.0/gcc/tree.h       (working copy)
+@@ -38,6 +38,7 @@
+   LAST_AND_UNUSED_TREE_CODE   /* A convenient way to get a value for
+                                  NUM_TREE_CODES.  */
++  ,__LAST_AND_UNUSED_TREE_CODE=32767 /* Force 16bit width.  */
+ };
+ #undef DEFTREECODE
+Index: gcc-4.3.0/gcc/rtl.h
+===================================================================
+--- gcc-4.3.0/gcc/rtl.h        (revision 130511)
++++ gcc-4.3.0/gcc/rtl.h        (working copy)
+@@ -48,9 +48,11 @@
+ #include "rtl.def"            /* rtl expressions are documented here */
+ #undef DEF_RTL_EXPR
+-  LAST_AND_UNUSED_RTX_CODE};  /* A convenient way to get a value for
++  LAST_AND_UNUSED_RTX_CODE    /* A convenient way to get a value for
+                                  NUM_RTX_CODE.
+                                  Assumes default enum value assignment.  */
++  ,__LAST_AND_UNUSED_RTX_CODE=32767 /* Force 16bit width.  */
++};
+ #define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
+                               /* The cast here, saves many elsewhere.  */
+Index: gcc-4.3.0/gcc/c-common.h
+===================================================================
+--- gcc-4.3.0/gcc/c-common.h   (revision 130511)
++++ gcc-4.3.0/gcc/c-common.h   (working copy)
+@@ -125,6 +125,7 @@
+   RID_LAST_AT = RID_AT_IMPLEMENTATION,
+   RID_FIRST_PQ = RID_IN,
+   RID_LAST_PQ = RID_ONEWAY
++  ,__LAST_AND_UNUSED_RID=32767 /* Force 16bit width.  */
+ };
+ #define OBJC_IS_AT_KEYWORD(rid) \
diff --git a/toolchain/gcc/patches/4.3.2/998-gcc-4.3.0-fix-header.00.patch b/toolchain/gcc/patches/4.3.2/998-gcc-4.3.0-fix-header.00.patch
new file mode 100644 (file)
index 0000000..7fe59d2
--- /dev/null
@@ -0,0 +1,15 @@
+\\\\
+\\ gcc PR33200
+Index: gcc-4.3.0/gcc/config.gcc
+===================================================================
+--- gcc-4.3.0/gcc/config.gcc   (revision 131628)
++++ gcc-4.3.0/gcc/config.gcc   (working copy)
+@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
+       if test x${enable_incomplete_targets} = xyes ; then
+               tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
+       fi
+-      use_fixproto=yes
++      # XXX: why? use_fixproto=yes
+       ;;
+ sh-*-rtemscoff*)
+       tmake_file="sh/t-sh t-rtems sh/t-rtems"
diff --git a/toolchain/gcc/patches/4.3.2/999-coldfire.patch b/toolchain/gcc/patches/4.3.2/999-coldfire.patch
new file mode 100644 (file)
index 0000000..2968e8d
--- /dev/null
@@ -0,0 +1,10 @@
+--- gcc-4.3.1/gcc/config.gcc.old       2008-06-17 23:49:00.000000000 +0200
++++ gcc-4.3.1/gcc/config.gcc   2008-06-17 23:03:07.000000000 +0200
+@@ -1630,6 +1630,7 @@
+       if test x$sjlj != x1; then
+           tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
+       fi
++      tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
+       ;;
+ m68k-*-rtems*)
+       default_m68k_cpu=68020
diff --git a/toolchain/glibc/patches/2.6.1/101-binutils_2_19.patch b/toolchain/glibc/patches/2.6.1/101-binutils_2_19.patch
new file mode 100644 (file)
index 0000000..cc1b740
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN glibc-2.6.1-old/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1-new/sysdeps/i386/fpu/ftestexcept.c
+--- glibc-2.6.1-old/sysdeps/i386/fpu/ftestexcept.c     2004-03-05 11:14:48.000000000 +0100
++++ glibc-2.6.1-new/sysdeps/i386/fpu/ftestexcept.c     2009-01-21 03:29:56.000000000 +0100
+@@ -26,7 +26,7 @@
+ int
+ fetestexcept (int excepts)
+ {
+-  int temp;
++  short temp;
+   int xtemp = 0;
+   /* Get current exceptions.  */
diff --git a/toolchain/glibc/patches/2.6.1/102-gcc_4_3.patch b/toolchain/glibc/patches/2.6.1/102-gcc_4_3.patch
new file mode 100644 (file)
index 0000000..86042f5
--- /dev/null
@@ -0,0 +1,38 @@
+http://sourceware.org/bugzilla/show_bug.cgi?id=5442
+
+diff -ruN glibc-2.6.1-old/configure.in glibc-2.6.1-new/configure.in
+--- glibc-2.6.1-old/configure.in       2007-03-20 13:11:23.000000000 +0100
++++ glibc-2.6.1-new/configure.in       2009-01-21 01:09:16.000000000 +0100
+@@ -911,8 +911,12 @@
+ # header directory and add that to the list.  NOTE: Only does the right
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+-  ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES=-nostdinc
++  for d in include include-fixed; do
++    i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" &&
++    SYSINCLUDES="$SYSINCLUDES -isystem $i"
++  done
++  SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
+diff -ruN glibc-2.6.1-old/configure glibc-2.6.1-new/configure
+--- glibc-2.6.1-old/configure  2007-07-31 15:46:12.000000000 +0200
++++ glibc-2.6.1-new/configure  2009-01-21 01:09:13.000000000 +0100
+@@ -4562,8 +4562,12 @@
+ # header directory and add that to the list.  NOTE: Only does the right
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+-  ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES=-nostdinc
++  for d in include include-fixed; do
++    i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" &&
++    SYSINCLUDES="$SYSINCLUDES -isystem $i"
++  done
++  SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&5` &&
diff --git a/toolchain/glibc/patches/2.7/101-binutils_2_19.patch b/toolchain/glibc/patches/2.7/101-binutils_2_19.patch
new file mode 100644 (file)
index 0000000..5971112
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN glibc-2.7-old/sysdeps/i386/fpu/ftestexcept.c glibc-2.7-new/sysdeps/i386/fpu/ftestexcept.c
+--- glibc-2.7-old/sysdeps/i386/fpu/ftestexcept.c       2004-03-05 11:14:48.000000000 +0100
++++ glibc-2.7-new/sysdeps/i386/fpu/ftestexcept.c       2009-01-21 03:33:43.000000000 +0100
+@@ -26,7 +26,7 @@
+ int
+ fetestexcept (int excepts)
+ {
+-  int temp;
++  short temp;
+   int xtemp = 0;
+   /* Get current exceptions.  */
diff --git a/toolchain/glibc/patches/2.7/102-gcc_4_3.patch b/toolchain/glibc/patches/2.7/102-gcc_4_3.patch
new file mode 100644 (file)
index 0000000..2ed3f54
--- /dev/null
@@ -0,0 +1,38 @@
+http://sourceware.org/bugzilla/show_bug.cgi?id=5442
+
+diff -ruN glibc-2.7-old/configure.in glibc-2.7-new/configure.in
+--- glibc-2.7-old/configure.in 2007-06-08 05:16:36.000000000 +0200
++++ glibc-2.7-new/configure.in 2009-01-21 01:12:42.000000000 +0100
+@@ -911,8 +911,12 @@
+ # header directory and add that to the list.  NOTE: Only does the right
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+-  ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES=-nostdinc
++  for d in include include-fixed; do
++    i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" &&
++    SYSINCLUDES="$SYSINCLUDES -isystem $i"
++  done
++  SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
+diff -ruN glibc-2.7-old/configure glibc-2.7-new/configure
+--- glibc-2.7-old/configure    2007-10-18 13:22:23.000000000 +0200
++++ glibc-2.7-new/configure    2009-01-21 01:12:45.000000000 +0100
+@@ -5062,8 +5062,12 @@
+ # header directory and add that to the list.  NOTE: Only does the right
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+-  ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES=-nostdinc
++  for d in include include-fixed; do
++    i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" &&
++    SYSINCLUDES="$SYSINCLUDES -isystem $i"
++  done
++  SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&5` &&
diff --git a/toolchain/uClibc/patches/910-gcc_4_3_include_fixed.patch b/toolchain/uClibc/patches/910-gcc_4_3_include_fixed.patch
new file mode 100644 (file)
index 0000000..3d64944
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ruN uClibc-0.9.29-old/Rules.mak uClibc-0.9.29-new/Rules.mak
+--- uClibc-0.9.29-old/Rules.mak        2009-01-17 16:18:36.662982000 +0100
++++ uClibc-0.9.29-new/Rules.mak        2009-01-17 19:14:02.473165330 +0100
+@@ -498,7 +498,8 @@
+ # Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include'
+ #CFLAGS+=-iwithprefix include
+-CFLAGS+=-isystem $(shell $(CC) -print-file-name=include)
++CC_IPREFIX:=$(shell $(CC) -print-file-name=include)
++CFLAGS+=-isystem $(CC_IPREFIX) -isystem $(CC_IPREFIX)-fixed
+ ifneq ($(DOASSERTS),y)
+ CFLAGS+=-DNDEBUG
index ecde1191baffdede062bdd1f6658c10468681d9b..81c69b404f6a4af7bb29147872ac5d45c4ce669f 100644 (file)
@@ -9,7 +9,7 @@
 curdir:=tools
 
 # subdirectories to descend into
-$(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf
+$(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf gmp mpfr
 
 # builddir dependencies
 $(curdir)/squashfs/compile := $(curdir)/lzma/install
diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile
new file mode 100644 (file)
index 0000000..4264671
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gmp
+PKG_VERSION:=4.2.4
+
+PKG_SOURCE_URL:=@GNU/gmp/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); \
+       ./configure \
+         --prefix=$(STAGING_DIR_HOST) \
+         --build=$(GNU_HOST_NAME) \
+         --enable-static \
+         --disable-shared \
+         --enable-cxx \
+         --enable-mpbsd \
+       );
+endef
+
+define Build/Compile
+       make -C $(PKG_BUILD_DIR) all
+endef
+
+define Build/Install
+       make -C $(PKG_BUILD_DIR) install
+endef
+
+define Build/Clean
+       rm -rf $(PKG_BUILD_DIR)
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile
new file mode 100644 (file)
index 0000000..84dc9ec
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mpfr
+PKG_VERSION:=2.3.2
+
+PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-current/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=527147c097874340cb9cee0579dacf3b
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); \
+       ./configure \
+         --prefix=$(STAGING_DIR_HOST) \
+         --build=$(GNU_HOST_NAME) \
+         --enable-static \
+         --disable-shared \
+         --with-gmp=$(STAGING_DIR_HOST) \
+       );
+endef
+
+define Build/Compile
+       make -C $(PKG_BUILD_DIR) all
+endef
+
+define Build/Install
+       make -C $(PKG_BUILD_DIR) install
+endef
+
+define Build/Clean
+       rm -rf $(PKG_BUILD_DIR)
+endef
+
+$(eval $(call HostBuild))