summaryrefslogtreecommitdiff
path: root/misc/buildroot/toolchain
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-05 23:01:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-05 23:01:51 +0000
commit504aab67db9f7d0ec7996796add85d2d4b798ae4 (patch)
tree45a9691ce93905db40ba6d2056b1cce17f30798e /misc/buildroot/toolchain
parent985473319cd77dd5e966c56a915dfea45222f613 (diff)
downloadnuttx-504aab67db9f7d0ec7996796add85d2d4b798ae4.tar.gz
nuttx-504aab67db9f7d0ec7996796add85d2d4b798ae4.tar.bz2
nuttx-504aab67db9f7d0ec7996796add85d2d4b798ae4.zip
Add buildroot support for binutils-2.22 and gcc-4.6.3; all buildroot tools are not called abc-nuttx-elf instead of abc-elf
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5213 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/buildroot/toolchain')
-rwxr-xr-xmisc/buildroot/toolchain/binutils/2.22/120-sh-conf.patch29
-rwxr-xr-xmisc/buildroot/toolchain/binutils/2.22/300-001_ld_makefile_patch.patch24
-rwxr-xr-xmisc/buildroot/toolchain/binutils/2.22/300-012_check_ldrunpath_length.patch21
-rwxr-xr-xmisc/buildroot/toolchain/binutils/2.22/999-ppc-textrels.patch80
-rw-r--r--misc/buildroot/toolchain/binutils/Config.in5
-rwxr-xr-xmisc/buildroot/toolchain/gcc/4.6.3/305-libmudflap-susv3-legacy.patch49
-rwxr-xr-xmisc/buildroot/toolchain/gcc/4.6.3/810-arm-softfloat-libgcc.patch38
-rwxr-xr-xmisc/buildroot/toolchain/gcc/4.6.3/820-arm-unbreak-armv4t.patch14
-rwxr-xr-xmisc/buildroot/toolchain/gcc/4.6.3/900-nuttx-nolibstdc.patch13
-rwxr-xr-xmisc/buildroot/toolchain/gcc/4.6.3/powerpc-link-with-math-lib.patch.conditional125
-rw-r--r--misc/buildroot/toolchain/gcc/Config.in6
-rw-r--r--misc/buildroot/toolchain/gdb/Config.in5
-rw-r--r--misc/buildroot/toolchain/gdb/gdb.mk2
13 files changed, 411 insertions, 0 deletions
diff --git a/misc/buildroot/toolchain/binutils/2.22/120-sh-conf.patch b/misc/buildroot/toolchain/binutils/2.22/120-sh-conf.patch
new file mode 100755
index 000000000..ea3d1b606
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.22/120-sh-conf.patch
@@ -0,0 +1,29 @@
+r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
+
+Likewise, binutils has no idea about any of these new targets either, so we
+fix that up too.. now we're able to actually build a real toolchain for
+sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
+inept targets than that one, really. Go look, I promise).
+
+--- a/configure
++++ b/configure
+@@ -1495,7 +1495,7 @@
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+--- a/configure.ac
++++ b/configure.ac
+@@ -712,7 +712,7 @@
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.22/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.22/300-001_ld_makefile_patch.patch
new file mode 100755
index 000000000..5cb0f614d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.22/300-001_ld_makefile_patch.patch
@@ -0,0 +1,24 @@
+diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
+--- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200
++++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200
+@@ -18,7 +18,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
+--- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200
++++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200
+@@ -287,7 +287,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.22/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.22/300-012_check_ldrunpath_length.patch
new file mode 100755
index 000000000..df783109b
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.22/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,21 @@
+diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em
+--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300
++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300
+@@ -1270,6 +1270,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -1497,6 +1499,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/misc/buildroot/toolchain/binutils/2.22/999-ppc-textrels.patch b/misc/buildroot/toolchain/binutils/2.22/999-ppc-textrels.patch
new file mode 100755
index 000000000..c1efacf24
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.22/999-ppc-textrels.patch
@@ -0,0 +1,80 @@
+http://bugs.gentoo.org/392645
+http://sourceware.org/bugzilla/show_bug.cgi?id=13470
+
+2011-12-03 Alan Modra <amodra@gmail.com>
+
+ PR ld/13470
+ * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive
+ change in 2011-07-01 commit. Comment.
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
+retrieving revision 1.302.2.1
+retrieving revision 1.302.2.2
+diff -u -r1.302.2.1 -r1.302.2.2
+--- src/bfd/elf32-ppc.c 2011/11/15 11:36:52 1.302.2.1
++++ src/bfd/elf32-ppc.c 2011/12/03 00:58:01 1.302.2.2
+@@ -2987,10 +2987,6 @@
+ edir->elf.needs_plt |= eind->elf.needs_plt;
+ edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
+
+- /* If we were called to copy over info for a weak sym, that's all. */
+- if (eind->elf.root.type != bfd_link_hash_indirect)
+- return;
+-
+ if (eind->dyn_relocs != NULL)
+ {
+ if (edir->dyn_relocs != NULL)
+@@ -3022,6 +3018,16 @@
+ eind->dyn_relocs = NULL;
+ }
+
++ /* If we were called to copy over info for a weak sym, that's all.
++ You might think dyn_relocs need not be copied over; After all,
++ both syms will be dynamic or both non-dynamic so we're just
++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
++ code in ppc_elf_adjust_dynamic_symbol needs to check for
++ dyn_relocs in read-only sections, and it does so on what is the
++ DIR sym here. */
++ if (eind->elf.root.type != bfd_link_hash_indirect)
++ return;
++
+ /* Copy over the GOT refcount entries that we may have already seen to
+ the symbol which just became indirect. */
+ edir->elf.got.refcount += eind->elf.got.refcount;
+===================================================================
+RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
+retrieving revision 1.363.2.4
+retrieving revision 1.363.2.5
+diff -u -r1.363.2.4 -r1.363.2.5
+--- src/bfd/elf64-ppc.c 2011/11/08 13:46:36 1.363.2.4
++++ src/bfd/elf64-ppc.c 2011/12/03 00:58:02 1.363.2.5
+@@ -4435,10 +4435,6 @@
+ edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
+ edir->elf.needs_plt |= eind->elf.needs_plt;
+
+- /* If we were called to copy over info for a weak sym, that's all. */
+- if (eind->elf.root.type != bfd_link_hash_indirect)
+- return;
+-
+ /* Copy over any dynamic relocs we may have on the indirect sym. */
+ if (eind->dyn_relocs != NULL)
+ {
+@@ -4471,6 +4467,16 @@
+ eind->dyn_relocs = NULL;
+ }
+
++ /* If we were called to copy over info for a weak sym, that's all.
++ You might think dyn_relocs need not be copied over; After all,
++ both syms will be dynamic or both non-dynamic so we're just
++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
++ code in ppc64_elf_adjust_dynamic_symbol needs to check for
++ dyn_relocs in read-only sections, and it does so on what is the
++ DIR sym here. */
++ if (eind->elf.root.type != bfd_link_hash_indirect)
++ return;
++
+ /* Copy over got entries that we may have already seen to the
+ symbol which just became indirect. */
+ if (eind->elf.got.glist != NULL)
diff --git a/misc/buildroot/toolchain/binutils/Config.in b/misc/buildroot/toolchain/binutils/Config.in
index d1e674ba5..028ac0412 100644
--- a/misc/buildroot/toolchain/binutils/Config.in
+++ b/misc/buildroot/toolchain/binutils/Config.in
@@ -30,6 +30,10 @@ choice
config BR2_BINUTILS_VERSION_2_21_1
depends !BR2_avr32 && !BR2_nios2 && !BR2_m9s12x
bool "binutils 2.21.1"
+
+ config BR2_BINUTILS_VERSION_2_22
+ depends !BR2_avr32 && !BR2_nios2 && !BR2_m9s12x
+ bool "binutils 2.22"
endchoice
config BR2_BINUTILS_VERSION
@@ -39,6 +43,7 @@ config BR2_BINUTILS_VERSION
default "2.19" if BR2_BINUTILS_VERSION_2_19
default "2.19.1" if BR2_BINUTILS_VERSION_2_19_1
default "2.21.1" if BR2_BINUTILS_VERSION_2_21_1
+ default "2.22" if BR2_BINUTILS_VERSION_2_22
config BR2_EXTRA_BINUTILS_CONFIG_OPTIONS
string "Additional binutils options"
diff --git a/misc/buildroot/toolchain/gcc/4.6.3/305-libmudflap-susv3-legacy.patch b/misc/buildroot/toolchain/gcc/4.6.3/305-libmudflap-susv3-legacy.patch
new file mode 100755
index 000000000..374b1f865
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.6.3/305-libmudflap-susv3-legacy.patch
@@ -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/misc/buildroot/toolchain/gcc/4.6.3/810-arm-softfloat-libgcc.patch b/misc/buildroot/toolchain/gcc/4.6.3/810-arm-softfloat-libgcc.patch
new file mode 100755
index 000000000..e6a30a3f0
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.6.3/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,38 @@
+[PATCH] add the correct symbols to libgcc for uclibc arm softfloat
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ gcc/config/arm/linux-elf.h | 2 +-
+ gcc/config/arm/t-linux | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+Index: gcc-4.4.0/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.4.0.orig/gcc/config/arm/t-linux
++++ gcc-4.4.0/gcc/config/arm/t-linux
+@@ -4,7 +4,11 @@
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
+- _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
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+Index: gcc-4.4.0/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h
++++ gcc-4.4.0/gcc/config/arm/linux-elf.h
+@@ -60,7 +60,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/misc/buildroot/toolchain/gcc/4.6.3/820-arm-unbreak-armv4t.patch b/misc/buildroot/toolchain/gcc/4.6.3/820-arm-unbreak-armv4t.patch
new file mode 100755
index 000000000..8651afcd8
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.6.3/820-arm-unbreak-armv4t.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
+
+diff -Nura gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h gcc-4.5.1/gcc/config/arm/linux-eabi.h
+--- gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h 2009-10-30 17:03:09.000000000 -0300
++++ gcc-4.5.1/gcc/config/arm/linux-eabi.h 2010-11-02 15:38:25.792208500 -0300
+@@ -44,7 +44,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ config.gcc for big endian configurations. */
diff --git a/misc/buildroot/toolchain/gcc/4.6.3/900-nuttx-nolibstdc.patch b/misc/buildroot/toolchain/gcc/4.6.3/900-nuttx-nolibstdc.patch
new file mode 100755
index 000000000..5628646a6
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.6.3/900-nuttx-nolibstdc.patch
@@ -0,0 +1,13 @@
+--- gcc-4.5.2/configure.orig 2011-04-28 17:25:37.091035400 -0600
++++ gcc-4.5.2/configure 2011-04-28 17:26:26.868332200 -0600
+@@ -3741,6 +3741,10 @@
+ ;;
+ esac
+
++# If we are building against NuttX, then don't attempt to build libstdc++
++# (should be conditioned on --with-nuttx)
++noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3"
++
+ # If we aren't building newlib, then don't build libgloss, since libgloss
+ # depends upon some newlib header files.
+ case "${noconfigdirs}" in
diff --git a/misc/buildroot/toolchain/gcc/4.6.3/powerpc-link-with-math-lib.patch.conditional b/misc/buildroot/toolchain/gcc/4.6.3/powerpc-link-with-math-lib.patch.conditional
new file mode 100755
index 000000000..7e75e87f2
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.6.3/powerpc-link-with-math-lib.patch.conditional
@@ -0,0 +1,125 @@
+http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
+
+On glibc the libc.so carries a copy of the math function copysignl() but
+on uClibc math functions like copysignl() live in libm. Since libgcc_s
+contains unresolved symbols, any attempt to link against libgcc_s
+without explicitely specifying -lm fails, resulting in a broken
+bootstrap of the compiler.
+
+Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver gcc-4.5.1/gcc/config/t-slibgcc-elf-ver
+--- gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:08.644904042 -0300
++++ gcc-4.5.1/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:56.332904024 -0300
+@@ -27,7 +27,7 @@
+ SHLIB_OBJS = @shlib_objs@
+ SHLIB_DIR = @multilib_dir@
+ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
+-SHLIB_LC = -lc
++SHLIB_LC = @libgcc_libm@ -lc
+ SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+diff -Nura gcc-4.5.1.orig/libgcc/Makefile.in gcc-4.5.1/libgcc/Makefile.in
+--- gcc-4.5.1.orig/libgcc/Makefile.in 2010-11-03 14:32:44.272904042 -0300
++++ gcc-4.5.1/libgcc/Makefile.in 2010-11-03 14:37:03.893904042 -0300
+@@ -39,6 +39,7 @@
+ decimal_float = @decimal_float@
+ enable_decimal_float = @enable_decimal_float@
+ fixed_point = @fixed_point@
++LIBGCC_LIBM = @LIBGCC_LIBM@
+
+ host_noncanonical = @host_noncanonical@
+
+@@ -798,9 +799,10 @@
+ @multilib_dir@,$(MULTIDIR),$(subst \
+ @shlib_objs@,$(objects),$(subst \
+ @shlib_base_name@,libgcc_s,$(subst \
++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
+ @shlib_map_file@,$(mapfile),$(subst \
+ @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
+- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
+
+ libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
+ # @multilib_flags@ is still needed because this may use
+diff -Nura gcc-4.5.1.orig/libgcc/configure gcc-4.5.1/libgcc/configure
+--- gcc-4.5.1.orig/libgcc/configure 2010-11-03 14:32:44.283904042 -0300
++++ gcc-4.5.1/libgcc/configure 2010-11-03 14:39:48.685904042 -0300
+@@ -557,6 +557,7 @@
+ extra_parts
+ tmake_file
+ set_use_emutls
++LIBGCC_LIBM
+ set_have_cc_tls
+ vis_hide
+ fixed_point
+@@ -3847,6 +3848,37 @@
+ set_use_emutls="-DUSE_EMUTLS"
+ fi
+
++# On powerpc libgcc_s references copysignl which is a libm function but
++# glibc apparently also provides it via libc as opposed to uClibc where
++# it lives in libm.
++echo "$as_me:$LINENO: checking for library containing copysignl" >&5
++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
++if test "${libgcc_cv_copysignl_lib+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ echo '#include <features.h>' > conftest.c
++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
++ libgcc_cv_copysignl_lib="-lc"
++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }
++ then
++ libgcc_cv_copysignl_lib="-lm"
++ fi
++ rm -f conftest.*
++
++fi
++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
++
++case /${libgcc_cv_copysignl_lib}/ in
++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
++ *) LIBGCC_LIBM= ;;
++esac
+
+ # Conditionalize the makefile for this target machine.
+ tmake_file_=
+diff -Nura gcc-4.5.1.orig/libgcc/configure.ac gcc-4.5.1/libgcc/configure.ac
+--- gcc-4.5.1.orig/libgcc/configure.ac 2010-11-03 14:32:44.735904042 -0300
++++ gcc-4.5.1/libgcc/configure.ac 2010-11-03 14:42:11.278904045 -0300
+@@ -238,6 +238,27 @@
+ fi
+ AC_SUBST(set_have_cc_tls)
+
++# On powerpc libgcc_s references copysignl which is a libm function but
++# glibc apparently also provides it via libc as opposed to uClibc where
++# it lives in libm.
++AC_CACHE_CHECK
++ libgcc_cv_copysignl_lib,
++ echo '#include <features.h>' > conftest.c
++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
++ libgcc_cv_copysignl_lib="-lc"
++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
++ then
++ libgcc_cv_copysignl_lib="-lm"
++ fi
++ rm -f conftest.*
++ ])
++
++case /${libgcc_cv_copysignl_lib}/ in
++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
++ *) LIBGCC_LIBM= ;;
++esac
++AC_SUBST(LIBGCC_LIBM)
++
+ # See if we have emulated thread-local storage.
+ GCC_CHECK_EMUTLS
+ set_use_emutls=
diff --git a/misc/buildroot/toolchain/gcc/Config.in b/misc/buildroot/toolchain/gcc/Config.in
index d2b4b69fe..822cfd4b9 100644
--- a/misc/buildroot/toolchain/gcc/Config.in
+++ b/misc/buildroot/toolchain/gcc/Config.in
@@ -41,6 +41,11 @@ choice
select BR2_GCC_SUPPORTS_SYSROOT
bool "gcc 4.5.2"
+ config BR2_GCC_VERSION_4_6_3
+ depends on !BR2_avr32 && !BR2_nios2 && !BR2_m9s12x
+ select BR2_GCC_SUPPORTS_SYSROOT
+ bool "gcc 4.6.3"
+
endchoice
config BR2_GCC_SUPPORTS_SYSROOT
@@ -54,6 +59,7 @@ config BR2_GCC_VERSION
default "4.2.4" if BR2_GCC_VERSION_4_2_4
default "4.3.3" if BR2_GCC_VERSION_4_3_3
default "4.5.2" if BR2_GCC_VERSION_4_5_2
+ default "4.6.3" if BR2_GCC_VERSION_4_6_3
config BR2_GCC_USE_SJLJ_EXCEPTIONS
bool "Enable setjmp/longjmp exceptions?"
diff --git a/misc/buildroot/toolchain/gdb/Config.in b/misc/buildroot/toolchain/gdb/Config.in
index fbea5b143..ebe8578a9 100644
--- a/misc/buildroot/toolchain/gdb/Config.in
+++ b/misc/buildroot/toolchain/gdb/Config.in
@@ -40,9 +40,14 @@ choice
bool "gdb 6.8"
depends on !BR2_avr32
+ config BR2_GDB_VERSION_7_4
+ config BR2_GDB_VERSION_7_4
+ depends on !BR2_bfin
+
endchoice
config BR2_GDB_VERSION
string
default "6.3" if BR2_GDB_VERSION_6_3
default "6.8" if BR2_GDB_VERSION_6_8
+ default "7.4.1" if BR2_GDB_VERSION_7_4
diff --git a/misc/buildroot/toolchain/gdb/gdb.mk b/misc/buildroot/toolchain/gdb/gdb.mk
index aa9e126bc..0f0f7e89b 100644
--- a/misc/buildroot/toolchain/gdb/gdb.mk
+++ b/misc/buildroot/toolchain/gdb/gdb.mk
@@ -36,7 +36,9 @@ ifeq ($(GDB_VERSION),snapshot)
tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
endif
+ifneq ($(wildcard toolchain/gdb/$(GDB_VERSION)),)
toolchain/patch-kernel.sh $(GDB_DIR) toolchain/gdb/$(GDB_VERSION) \*.patch
+endif
$(CONFIG_UPDATE) $(GDB_DIR)
touch $(GDB_DIR)/.unpacked