summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-02-18 12:51:36 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-02-18 12:51:36 -0600
commit2f49cca8d1c256c9c3f33a70de98dbf68c2414e3 (patch)
treed6819266ae96dd0d0423578cd5f425a8e5a5f462 /misc
parent505e4af4af4950b5e6c5533b33039b5cd4fed9ab (diff)
downloadnuttx-2f49cca8d1c256c9c3f33a70de98dbf68c2414e3.tar.gz
nuttx-2f49cca8d1c256c9c3f33a70de98dbf68c2414e3.tar.bz2
nuttx-2f49cca8d1c256c9c3f33a70de98dbf68c2414e3.zip
Buildroot support for GCC 4.7.3 and for Cortex-M4 with hardware floating point from David Alessio
Diffstat (limited to 'misc')
-rw-r--r--misc/buildroot/ChangeLog4
-rw-r--r--misc/buildroot/Config.in13
-rw-r--r--misc/buildroot/configs/cortexm4f-eabi-defconfig-4.7.3137
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/305-libmudflap-susv3-legacy.patch49
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/810-arm-softfloat-libgcc.patch25
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/830-arm_unbreak_armv4t.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/900-nuttx-nolibstdc.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/910-Avoid-build-failures-from-Link-tests-are-not-allowed-after-GCC_NO_EXECUTABLES.patch.libstdc++1147
-rw-r--r--misc/buildroot/toolchain/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional122
-rw-r--r--misc/buildroot/toolchain/gcc/Config.in6
-rw-r--r--misc/buildroot/toolchain/gcc/Makefile.in24
11 files changed, 1551 insertions, 2 deletions
diff --git a/misc/buildroot/ChangeLog b/misc/buildroot/ChangeLog
index 497380d15..69eccd948 100644
--- a/misc/buildroot/ChangeLog
+++ b/misc/buildroot/ChangeLog
@@ -142,3 +142,7 @@ buildroot-1.13 2011-01-29 <gnutt@nuttx.org>
* Bring-in support for GCC 4.8.2 from the "real" buildroot (2013-12-26).
buildroot-1.14 2011-xx-xx <gnutt@nuttx.org>
+
+ * Support for the GCC 4.7.3 compiler from David Alession (2014-2-18)
+ * Support for the Cortex-M4F (with hardware floating point). Also from
+ David Alessio (2014-2-18).
diff --git a/misc/buildroot/Config.in b/misc/buildroot/Config.in
index 2de4e570c..192a456f0 100644
--- a/misc/buildroot/Config.in
+++ b/misc/buildroot/Config.in
@@ -100,6 +100,10 @@ config BR2_cortex_a8
config BR2_cortex_m3
bool "Cortex-M3/M4"
select BR2_GCC_CORTEX
+config BR2_cortex_m4f
+ bool "Cortex-M4F"
+ select BR2_GCC_CORTEX
+ select BR2_GCC_CORTEX_M4F
config BR2_cortex_m0
bool "Cortex-M0"
select BR2_GCC_CORTEX
@@ -117,6 +121,10 @@ config BR2_GCC_CORTEX
bool
default n
+config BR2_GCC_CORTEX_M4F
+ bool
+ default n
+
choice
prompt "Target ABI"
depends BR2_arm || BR2_armeb
@@ -233,6 +241,7 @@ config BR2_GCC_TARGET_TUNE
default cortex-a5 if BR2_cortex_a5
default cortex-a8 if BR2_cortex_a8
default cortex-m3 if BR2_cortex_m3
+ default cortex-m4 if BR2_cortex_m4f
default cortex-m0 if BR2_cortex_m0
default strongarm110 if BR2_sa110
default strongarm1100 if BR2_sa1100
@@ -251,8 +260,8 @@ config BR2_GCC_TARGET_ARCH
default armv4t if BR2_arm720t || BR2_arm920t || BR2_arm922t
default armv5te if BR2_arm926t || BR2_arm10t || BR2_xscale
default armv6j if BR2_arm1136jf_s
- default armv7-a if BR2_cortex_a5 || BR_cortex_a8
- default armv7-m if BR2_cortex_m3
+ default armv7-a if BR2_cortex_a5 || BR2_cortex_a8
+ default armv7-m if BR2_cortex_m3 || BR2_cortex_m4f
default armv6-m if BR2_cortex_m0
default iwmmxt if BR2_iwmmxt
diff --git a/misc/buildroot/configs/cortexm4f-eabi-defconfig-4.7.3 b/misc/buildroot/configs/cortexm4f-eabi-defconfig-4.7.3
new file mode 100644
index 000000000..161a690ac
--- /dev/null
+++ b/misc/buildroot/configs/cortexm4f-eabi-defconfig-4.7.3
@@ -0,0 +1,137 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_alpha is not set
+BR2_arm=y
+# BR2_armeb is not set
+# BR2_avr is not set
+# BR2_avr32 is not set
+# BR2_bfin is not set
+# BR2_cris is not set
+# BR2_i386 is not set
+# BR2_m32c is not set
+# BR2_m68k is not set
+# BR2_m68hc11 is not set
+# BR2_m68hc12 is not set
+# BR2_m9s12x is not set
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_nios2 is not set
+# BR2_powerpc is not set
+# BR2_sh is not set
+# BR2_sh64 is not set
+# BR2_h8300 is not set
+# BR2_sparc is not set
+# BR2_x86_64 is not set
+# BR2_generic_arm is not set
+# BR2_arm610 is not set
+# BR2_arm7tdmi is not set
+# BR2_arm710 is not set
+# BR2_arm720t is not set
+# BR2_arm740t is not set
+# BR2_arm920t is not set
+# BR2_arm922t is not set
+# BR2_arm926t is not set
+# BR2_arm1136jf_s is not set
+# BR2_cortex_a5 is not set
+# BR2_cortex_a8 is not set
+# BR2_cortex_m3 is not set
+BR2_cortex_m4f=y
+# BR2_cortex_m0 is not set
+# BR2_sa110 is not set
+# BR2_sa1100 is not set
+# BR2_xscale is not set
+# BR2_iwmmxt is not set
+BR2_GCC_CORTEX=y
+BR2_GCC_CORTEX_M4F=y
+# BR2_ARM_OABI is not set
+BR2_ARM_EABI=y
+BR2_ARCH="arm"
+BR2_GCC_TARGET_TUNE="cortex-m4"
+BR2_GCC_TARGET_ARCH="armv7-m"
+BR2_GCC_TARGET_ABI="aapcs-linux"
+BR2_ENDIAN="LITTLE"
+
+#
+# Build options
+#
+BR2_WGET="wget --passive-ftp"
+BR2_SVN="svn co"
+BR2_ZCAT="zcat"
+BR2_BZCAT="bzcat"
+BR2_TAR_OPTIONS=""
+BR2_DL_DIR="$(BASE_DIR)/dl"
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx"
+BR2_TOPDIR_PREFIX=""
+BR2_TOPDIR_SUFFIX=""
+BR2_GNU_BUILD_SUFFIX="pc-elf"
+BR2_GNU_TARGET_SUFFIX="nuttx-eabi"
+BR2_PREFER_IMA=y
+
+#
+# Toolchain Options
+#
+
+#
+# Binutils Options
+#
+# BR2_BINUTILS_VERSION_2_17 is not set
+# BR2_BINUTILS_VERSION_2_18 is not set
+# BR2_BINUTILS_VERSION_2_19 is not set
+# BR2_BINUTILS_VERSION_2_19_1 is not set
+# BR2_BINUTILS_VERSION_2_21_1 is not set
+# BR2_BINUTILS_VERSION_2_22 is not set
+BR2_BINUTILS_VERSION_2_24=y
+BR2_BINUTILS_VERSION="2.24"
+BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
+
+#
+# GCC Options
+#
+BR2_PACKAGE_GCC=y
+# BR2_GCC_VERSION_3_3_6 is not set
+# BR2_GCC_VERSION_3_4_6 is not set
+# BR2_GCC_VERSION_4_2_4 is not set
+# BR2_GCC_VERSION_4_3_3 is not set
+# BR2_GCC_VERSION_4_5_2 is not set
+# BR2_GCC_VERSION_4_6_3 is not set
+BR2_GCC_VERSION_4_7_3=y
+# BR2_GCC_VERSION_4_8_2 is not set
+BR2_GCC_SUPPORTS_SYSROOT=y
+BR2_GCC_VERSION="4.7.3"
+# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
+BR2_EXTRA_GCC_CONFIG_OPTIONS=""
+BR2_INSTALL_LIBSTDCPP=y
+# BR2_INSTALL_LIBGCJ is not set
+# BR2_INSTALL_OBJC is not set
+# BR2_INSTALL_FORTRAN is not set
+
+#
+# Gdb Options
+#
+# BR2_PACKAGE_GDB is not set
+# BR2_PACKAGE_GDB_SERVER is not set
+BR2_PACKAGE_GDB_HOST=y
+# BR2_GDB_VERSION_6_3 is not set
+# BR2_GDB_VERSION_6_4 is not set
+# BR2_GDB_VERSION_6_8 is not set
+BR2_GDB_VERSION_7_4_1=y
+BR2_GDB_VERSION="7.4.1"
+
+#
+# NuttX Binary Support
+#
+# BR2_PACKAGE_NXFLAT is not set
+BR2_PACKAGE_GENROMFS=y
+
+#
+# Common Toolchain Options
+#
+# BR2_PACKAGE_SSTRIP_TARGET is not set
+# BR2_PACKAGE_SSTRIP_HOST is not set
+# BR2_ENABLE_MULTILIB is not set
+BR2_LARGEFILE=y
+# BR2_SOFT_FLOAT is not set
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
diff --git a/misc/buildroot/toolchain/gcc/4.7.3/305-libmudflap-susv3-legacy.patch b/misc/buildroot/toolchain/gcc/4.7.3/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 000000000..374b1f865
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.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.7.3/810-arm-softfloat-libgcc.patch b/misc/buildroot/toolchain/gcc/4.7.3/810-arm-softfloat-libgcc.patch
new file mode 100644
index 000000000..a3d7db014
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.3/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,25 @@
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -57,7 +57,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"
+
+--- a/libgcc/config/arm/t-linux
++++ b/libgcc/config/arm/t-linux
+@@ -1,6 +1,10 @@
+ LIB1ASMSRC = arm/lib1funcs.S
+ 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
+
+ # Just for these, we omit the frame pointer since it makes such a big
+ # difference.
diff --git a/misc/buildroot/toolchain/gcc/4.7.3/830-arm_unbreak_armv4t.patch b/misc/buildroot/toolchain/gcc/4.7.3/830-arm_unbreak_armv4t.patch
new file mode 100644
index 000000000..37f8f2a54
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.3/830-arm_unbreak_armv4t.patch
@@ -0,0 +1,13 @@
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
+
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -45,7 +45,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.7.3/900-nuttx-nolibstdc.patch b/misc/buildroot/toolchain/gcc/4.7.3/900-nuttx-nolibstdc.patch
new file mode 100644
index 000000000..5628646a6
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.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.7.3/910-Avoid-build-failures-from-Link-tests-are-not-allowed-after-GCC_NO_EXECUTABLES.patch.libstdc++ b/misc/buildroot/toolchain/gcc/4.7.3/910-Avoid-build-failures-from-Link-tests-are-not-allowed-after-GCC_NO_EXECUTABLES.patch.libstdc++
new file mode 100644
index 000000000..c93849f0e
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.3/910-Avoid-build-failures-from-Link-tests-are-not-allowed-after-GCC_NO_EXECUTABLES.patch.libstdc++
@@ -0,0 +1,1147 @@
+diff --git a/patches/gcc/4.6.3/101-fix-no-executables.patch b/patches/gcc/4.6.3/101-fix-no-executables.patch
+new file mode 100644
+index 0000000..13a68ef
+--- /dev/null
++++ b/patches/gcc/4.6.3/101-fix-no-executables.patch
+@@ -0,0 +1,1141 @@
++At some point the libstdc++ library configure script added a test for cross
++compiling, if so it disables all configure time compiler-link tests on the
++premis that the tool chain cannot link.
++
++In the crosstool-ng case, with at least glibc/eglibc, the libstdc++ build is
++done at the very end after a full libc is installed and all the start files
++are valid. The compiler can link, so take the test out of the libstdc++
++configure.
++
++Two reasons
++ 1) The libstdc++ configure has a hackish work around path for the no link case,
++ we don't want to use it unless *absolutely* necessary
++ 2) Some systems will hit this error:
++ checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
++ Which is due to the usage of libtool triggering a link test.
++
++diff -u gcc-4.6.3.orig/libstdc++-v3/configure.ac gcc-4.6.3/libstdc++-v3/configure.ac
++--- gcc-4.6.3.orig/libstdc++-v3/configure.ac 2012-09-17 22:45:33.966110989 -0600
+++++ gcc-4.6.3/libstdc++-v3/configure.ac 2012-09-17 22:46:11.543201561 -0600
++@@ -52,7 +52,8 @@
++ ;;
++
++ *)
++- GCC_NO_EXECUTABLES
+++# GCC_NO_EXECUTABLES
+++ GLIBCXX_IS_NATIVE=true
++ ;;
++ esac
++ else
++--- gcc-4.6.3.orig/libstdc++-v3/configure 2012-09-18 00:00:24.449933919 -0600
+++++ gcc-4.6.3/libstdc++-v3/configure 2012-09-18 00:00:35.190244290 -0600
++@@ -1913,10 +1913,7 @@
++ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++ $as_echo_n "(cached) " >&6
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++@@ -3034,7 +3031,8 @@
++ ;;
++
++ *)
++-
+++# GCC_NO_EXECUTABLES
+++ GLIBCXX_IS_NATIVE=true
++ ;;
++ esac
++ else
++@@ -3869,34 +3867,6 @@
++ return 0;
++ }
++ _ACEOF
++-# FIXME: Cleanup?
++-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
++- (eval $ac_link) 2>&5
++- ac_status=$?
++- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++- test $ac_status = 0; }; then :
++- gcc_no_link=no
++-else
++- gcc_no_link=yes
++-fi
++-if test x$gcc_no_link = xyes; then
++- # Setting cross_compile will disable run tests; it will
++- # also disable AC_CHECK_FILE but that's generally
++- # correct if we can't link.
++- cross_compiling=yes
++- EXEEXT=
++-else
++- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++-/* end confdefs.h. */
++-
++-int
++-main ()
++-{
++-
++- ;
++- return 0;
++-}
++-_ACEOF
++ ac_clean_files_save=$ac_clean_files
++ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
++ # Try to create an executable without -o first, disregard a.out.
++@@ -4060,7 +4030,6 @@
++ rm -f conftest.$ac_ext
++ EXEEXT=$ac_cv_exeext
++ ac_exeext=$EXEEXT
++-fi
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
++ $as_echo_n "checking for suffix of object files... " >&6; }
++ if test "${ac_cv_objext+set}" = set; then :
++@@ -7158,10 +7127,7 @@
++ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -7747,10 +7713,7 @@
++ save_LDFLAGS=$LDFLAGS
++ echo "_main" > conftest.sym
++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -9514,10 +9477,7 @@
++ allow_undefined_flag='-berok'
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -9557,10 +9517,7 @@
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -9843,10 +9800,7 @@
++ # implicitly export all symbols.
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int foo(void) {}
++ _ACEOF
++@@ -10796,10 +10750,7 @@
++ save_libdir=$libdir
++ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
++ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -11216,9 +11167,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-ldl $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -11272,9 +11220,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-ldld $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -11318,9 +11263,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-ldl $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -11360,9 +11302,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lsvld $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -11402,9 +11341,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-ldld $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -11484,7 +11420,7 @@
++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++ lt_status=$lt_dlunknown
++ cat > conftest.$ac_ext <<_LT_EOF
++-#line 11487 "configure"
+++#line 11423 "configure"
++ #include "confdefs.h"
++
++ #if HAVE_DLFCN_H
++@@ -11590,7 +11526,7 @@
++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++ lt_status=$lt_dlunknown
++ cat > conftest.$ac_ext <<_LT_EOF
++-#line 11593 "configure"
+++#line 11529 "configure"
++ #include "confdefs.h"
++
++ #if HAVE_DLFCN_H
++@@ -12328,10 +12264,7 @@
++ allow_undefined_flag_CXX='-berok'
++ # Determine the default libpath from the value encoded in an empty
++ # executable.
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -12372,10 +12305,7 @@
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -14479,10 +14409,7 @@
++ save_libdir=$libdir
++ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
++ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -14948,7 +14875,7 @@
++ #
++ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
++ cat > conftest.$ac_ext << EOF
++-#line 14951 "configure"
+++#line 14878 "configure"
++ struct S { ~S(); };
++ void bar();
++ void foo()
++@@ -15128,10 +15055,7 @@
++ $as_echo_n "(cached) " >&6
++ else
++
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -15174,10 +15098,7 @@
++ $as_echo_n "(cached) " >&6
++ else
++
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -15220,10 +15141,7 @@
++ $as_echo_n "(cached) " >&6
++ else
++
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -15266,10 +15184,7 @@
++ $as_echo_n "(cached) " >&6
++ else
++
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -15316,7 +15231,7 @@
++ # Fake what AC_TRY_COMPILE does.
++
++ cat > conftest.$ac_ext << EOF
++-#line 15319 "configure"
+++#line 15234 "configure"
++ int main()
++ {
++ typedef bool atomic_type;
++@@ -15353,7 +15268,7 @@
++ rm -f conftest*
++
++ cat > conftest.$ac_ext << EOF
++-#line 15356 "configure"
+++#line 15271 "configure"
++ int main()
++ {
++ typedef short atomic_type;
++@@ -15390,7 +15305,7 @@
++ rm -f conftest*
++
++ cat > conftest.$ac_ext << EOF
++-#line 15393 "configure"
+++#line 15308 "configure"
++ int main()
++ {
++ // NB: _Atomic_word not necessarily int.
++@@ -15428,7 +15343,7 @@
++ rm -f conftest*
++
++ cat > conftest.$ac_ext << EOF
++-#line 15431 "configure"
+++#line 15346 "configure"
++ int main()
++ {
++ typedef long long atomic_type;
++@@ -15504,7 +15419,7 @@
++ # unnecessary for this test.
++
++ cat > conftest.$ac_ext << EOF
++-#line 15507 "configure"
+++#line 15422 "configure"
++ int main()
++ {
++ _Decimal32 d1;
++@@ -15957,10 +15872,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_c_try_link "$LINENO"; then :
+++ if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_search_gettext=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -16368,9 +16280,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -16454,10 +16363,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <math.h>
++ volatile double d1, d2;
++@@ -16605,10 +16511,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <complex.h>
++ typedef __complex__ float float_type;
++@@ -16719,10 +16622,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdio.h>
++ #include <stdarg.h>
++@@ -16797,10 +16697,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ volatile float f;
++@@ -17802,10 +17699,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <unistd.h>
++ #include <stdio.h>
++@@ -17906,10 +17800,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <poll.h>
++ int
++@@ -17988,10 +17879,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/stat.h>
++ int
++@@ -18040,10 +17928,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/stat.h>
++ int
++@@ -18142,10 +18027,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/uio.h>
++ int
++@@ -18851,10 +18733,7 @@
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ else
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/time.h>
++ int
++@@ -18963,10 +18842,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_cxx_try_link "$LINENO"; then :
+++ if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_cv_search_clock_gettime=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -19022,10 +18898,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_cxx_try_link "$LINENO"; then :
+++ if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_cv_search_nanosleep=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -19082,10 +18955,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_cxx_try_link "$LINENO"; then :
+++ if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_cv_search_clock_gettime=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -19141,10 +19011,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_cxx_try_link "$LINENO"; then :
+++ if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_cv_search_nanosleep=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -19211,10 +19078,7 @@
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-if ac_fn_cxx_try_link "$LINENO"; then :
+++ if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_cv_search_sched_yield=$ac_res
++ fi
++ rm -f core conftest.err conftest.$ac_objext \
++@@ -19280,10 +19144,7 @@
++ if test x"$ac_has_unistd_h" = x"yes"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clock" >&5
++ $as_echo_n "checking for monotonic clock... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <unistd.h>
++ #include <time.h>
++@@ -19313,10 +19174,7 @@
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for realtime clock" >&5
++ $as_echo_n "checking for realtime clock... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <unistd.h>
++ #include <time.h>
++@@ -19346,10 +19204,7 @@
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep" >&5
++ $as_echo_n "checking for nanosleep... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <unistd.h>
++ #include <time.h>
++@@ -19721,10 +19576,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -19804,9 +19656,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -25501,10 +25350,7 @@
++ else
++
++ if test "$cross_compiling" = yes; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int main() { return a = b; }
++ _ACEOF
++@@ -25517,18 +25363,12 @@
++ esac
++ chktls_save_CFLAGS="$CFLAGS"
++ CFLAGS="-fPIC $CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int f() { return 0; }
++ _ACEOF
++ if ac_fn_c_try_link "$LINENO"; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int f() { return a = b; }
++ _ACEOF
++@@ -25561,10 +25401,7 @@
++ if ac_fn_c_try_run "$LINENO"; then :
++ chktls_save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-static $LDFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int main() { return 0; }
++ _ACEOF
++@@ -25599,10 +25436,7 @@
++ thread_CFLAGS=failed
++ for flag in '' '-pthread' '-lpthread'; do
++ CFLAGS="$flag $chktls_save_CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <pthread.h>
++ void *g(void *d) { return NULL; }
++@@ -26268,10 +26102,7 @@
++
++ am_cv_func_iconv="no, consider installing GNU libiconv"
++ am_cv_lib_iconv=no
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -26293,10 +26124,7 @@
++ if test "$am_cv_func_iconv" != yes; then
++ am_save_LIBS="$LIBS"
++ LIBS="$LIBS $LIBICONV"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -26623,10 +26451,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -26706,9 +26531,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -32438,10 +32260,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -32521,9 +32340,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -38208,10 +38024,7 @@
++
++ am_cv_func_iconv="no, consider installing GNU libiconv"
++ am_cv_lib_iconv=no
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -38233,10 +38046,7 @@
++ if test "$am_cv_func_iconv" != yes; then
++ am_save_LIBS="$LIBS"
++ LIBS="$LIBS $LIBICONV"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -38351,9 +38161,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -44083,10 +43890,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -44297,10 +44101,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -44439,10 +44240,7 @@
++ else
++
++ if test "$cross_compiling" = yes; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int main() { return a = b; }
++ _ACEOF
++@@ -44455,18 +44253,12 @@
++ esac
++ chktls_save_CFLAGS="$CFLAGS"
++ CFLAGS="-fPIC $CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int f() { return 0; }
++ _ACEOF
++ if ac_fn_c_try_link "$LINENO"; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int f() { return a = b; }
++ _ACEOF
++@@ -44499,10 +44291,7 @@
++ if ac_fn_c_try_run "$LINENO"; then :
++ chktls_save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-static $LDFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int main() { return 0; }
++ _ACEOF
++@@ -44537,10 +44326,7 @@
++ thread_CFLAGS=failed
++ for flag in '' '-pthread' '-lpthread'; do
++ CFLAGS="$flag $chktls_save_CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <pthread.h>
++ void *g(void *d) { return NULL; }
++@@ -44772,10 +44558,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -44855,9 +44638,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -50524,10 +50304,7 @@
++ else
++
++ if test "$cross_compiling" = yes; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int main() { return a = b; }
++ _ACEOF
++@@ -50540,18 +50317,12 @@
++ esac
++ chktls_save_CFLAGS="$CFLAGS"
++ CFLAGS="-fPIC $CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int f() { return 0; }
++ _ACEOF
++ if ac_fn_c_try_link "$LINENO"; then :
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ __thread int a; int b; int f() { return a = b; }
++ _ACEOF
++@@ -50584,10 +50355,7 @@
++ if ac_fn_c_try_run "$LINENO"; then :
++ chktls_save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-static $LDFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int main() { return 0; }
++ _ACEOF
++@@ -50622,10 +50390,7 @@
++ thread_CFLAGS=failed
++ for flag in '' '-pthread' '-lpthread'; do
++ CFLAGS="$flag $chktls_save_CFLAGS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <pthread.h>
++ void *g(void *d) { return NULL; }
++@@ -50748,10 +50513,7 @@
++
++ am_cv_func_iconv="no, consider installing GNU libiconv"
++ am_cv_lib_iconv=no
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -50773,10 +50535,7 @@
++ if test "$am_cv_func_iconv" != yes; then
++ am_save_LIBS="$LIBS"
++ LIBS="$LIBS $LIBICONV"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <stdlib.h>
++ #include <iconv.h>
++@@ -50941,10 +50700,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -51024,9 +50780,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -56741,10 +56494,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -56908,10 +56658,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -57057,10 +56804,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -57285,10 +57029,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -57368,9 +57109,6 @@
++ else
++ ac_check_lib_save_LIBS=$LIBS
++ LIBS="-lm $LIBS"
++-if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++@@ -63085,10 +62823,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -63257,10 +62992,7 @@
++ # Check for -Wl,--gc-sections
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
++ $as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ int one(void) { return 1; }
++ int two(void) { return 2; }
++@@ -63524,10 +63256,7 @@
++ # if programs are run by default against NPTL and if not, issue
++ # a warning.
++ enable_linux_futex=no
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/syscall.h>
++ int lk;
++@@ -63542,10 +63271,7 @@
++ if ac_fn_c_try_link "$LINENO"; then :
++ save_LIBS="$LIBS"
++ LIBS="-lpthread $LIBS"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #ifndef _GNU_SOURCE
++ #define _GNU_SOURCE 1
++@@ -63582,10 +63308,7 @@
++ conftest$ac_exeext conftest.$ac_ext
++ ;;
++ yes)
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ #include <sys/syscall.h>
++ int lk;
++@@ -64163,10 +63886,7 @@
++ $as_echo_n "checking for shared libgcc... " >&6; }
++ ac_save_CFLAGS="$CFLAGS"
++ CFLAGS=' -lgcc_s'
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
++@@ -64196,10 +63916,7 @@
++ rm -f conftest.c conftest.so
++ if test x${glibcxx_libgcc_s_suffix+set} = xset; then
++ CFLAGS=" -lgcc_s$glibcxx_libgcc_s_suffix"
++- if test x$gcc_no_link = xyes; then
++- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++-fi
++-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++
++ int
diff --git a/misc/buildroot/toolchain/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional b/misc/buildroot/toolchain/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional
new file mode 100644
index 000000000..b7094fe65
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional
@@ -0,0 +1,122 @@
+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>
+
+---
+ libgcc/Makefile.in | 4 +++-
+ libgcc/configure | 32 ++++++++++++++++++++++++++++++++
+ libgcc/configure.ac | 21 +++++++++++++++++++++
+ 3 files changed, 56 insertions(+), 1 deletion(-)
+
+Index: gcc-4.8.0/libgcc/Makefile.in
+===================================================================
+--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100
++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100
+@@ -41,6 +41,7 @@
+ decimal_float = @decimal_float@
+ enable_decimal_float = @enable_decimal_float@
+ fixed_point = @fixed_point@
++LIBGCC_LIBM = @LIBGCC_LIBM@
+
+ host_noncanonical = @host_noncanonical@
+ target_noncanonical = @target_noncanonical@
+@@ -927,9 +928,10 @@
+ @multilib_dir@,$(MULTIDIR),$(subst \
+ @shlib_objs@,$(objects) libgcc.a,$(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
+Index: gcc-4.8.0/libgcc/configure
+===================================================================
+--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100
++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100
+@@ -564,6 +564,7 @@
+ tmake_file
+ sfp_machine_header
+ set_use_emutls
++LIBGCC_LIBM
+ set_have_cc_tls
+ vis_hide
+ fixed_point
+@@ -4481,6 +4482,37 @@
+ fi
+ 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_=
+Index: gcc-4.8.0/libgcc/configure.ac
+===================================================================
+--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200
++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100
+@@ -326,6 +326,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 3a8f61592..2e39074cf 100644
--- a/misc/buildroot/toolchain/gcc/Config.in
+++ b/misc/buildroot/toolchain/gcc/Config.in
@@ -46,6 +46,11 @@ choice
select BR2_GCC_SUPPORTS_SYSROOT
bool "gcc 4.6.3"
+ config BR2_GCC_VERSION_4_7_3
+ depends on !BR2_avr32 && !BR2_nios2 && !BR2_m9s12x
+ select BR2_GCC_SUPPORTS_SYSROOT
+ bool "gcc 4.7.3"
+
config BR2_GCC_VERSION_4_8_2
depends on !BR2_avr32 && !BR2_nios2 && !BR2_m9s12x
select BR2_GCC_SUPPORTS_SYSROOT
@@ -65,6 +70,7 @@ config BR2_GCC_VERSION
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
+ default "4.7.3" if BR2_GCC_VERSION_4_7_3
default "4.8.2" if BR2_GCC_VERSION_4_8_2
config BR2_GCC_USE_SJLJ_EXCEPTIONS
diff --git a/misc/buildroot/toolchain/gcc/Makefile.in b/misc/buildroot/toolchain/gcc/Makefile.in
index 7ae07cfe8..0329c199f 100644
--- a/misc/buildroot/toolchain/gcc/Makefile.in
+++ b/misc/buildroot/toolchain/gcc/Makefile.in
@@ -23,8 +23,11 @@ SOFT_FLOAT_CONFIG_OPTION:=--without-float
endif
# again... there must be a better way
+
ifeq ($(findstring x4.,x$(GCC_VERSION)),x4.)
+
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+
ifeq ($(BR2_SOFT_FLOAT_FP),y)
TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
else # no fp at all
@@ -34,7 +37,9 @@ else
TARGET_SOFT_FLOAT:=-msoft-float
endif
endif
+
else # not gcc-4.x
+
TARGET_SOFT_FLOAT:=-msoft-float
endif
ARCH_FPU_SUFFIX:=_nofpu
@@ -42,24 +47,43 @@ else # no softfloat support
SOFT_FLOAT_CONFIG_OPTION:=
TARGET_SOFT_FLOAT:=
ARCH_FPU_SUFFIX:=
+
+endif
+
+# DSA: config gcc to build Cortex-M4 compiler with hard float
+
+ifeq ($(strip $(BR2_GCC_CORTEX_M4F)),y)
+TARGET_SOFT_FLOAT:=-mfpu=fpv4-sp-d16 -mfloat-abi=hard -mhard-float
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=hard
+ARCH_FPU_SUFFIX:=_hf
endif
# some additional tuning values
+
ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ARCH))),)
# ")))
GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
endif
+
ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_TUNE))),)
# ")))
GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
endif
+
ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ABI))),)
# ")))
GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
endif
+
ifdef BR2_cortex_m0
GCC_WITH_MODE:=--with-mode=thumb
endif
+
ifdef BR2_cortex_m3
GCC_WITH_MODE:=--with-mode=thumb
endif
+
+# DSA: config gcc to build Cortec-M4 compiler with hard float
+ifdef BR2_cortex_m4f
+GCC_WITH_MODE:=--with-mode=thumb
+endif