First attempt to make a generic hardfp build with optimized files per device options. It breaks
initrd creation when it tries to load the included file from its Makefile as it picks current
directory ($pwd/initrd) to look for that include instead of toolchain path.
Fixed builds:
binutils: Removed patch binutils-2.21.1-gnueabihf.patch. Fixed in last sources (binutils 2.22)
gcc-static: --disable-libquadmath (arm hasn't __float128)
Adapted gcc-4.7.2-gnueabihf.patch
glibc: "libc_cv_ctors_header=yes" (gcc constructor support is configured without the configure test)
Removed patch glibc-2.13-gnueabihf.patch. Fixed in last sources (glibc 2.16.0)
Removed patch glibc-2.13-prelink.patch
gcc-final: --disable-bootstrap (removed the three times build bootstrap)
--disable-libgomp (not needed for cross compilations)
--disable-libstdcxx-pch (don't build the pre-compiled header (PCH) for libstdc++)
--enable-c99 --enable-long-long (removed these options as in softfp)
# LINUX HEADERS
$(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2:
- wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$(KERNEL_HEADERS_VERSION).tar.bz2
+ wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$(KERNEL_HEADERS_VERSION).tar.bz2
$(WORK)/linux-$(KERNEL_HEADERS_VERSION): $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2
tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2
$(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2:
wget -P $(WORK) -c http://ftp.gnu.org/gnu/mpfr/mpfr-$(LIBMPFR_VERSION).tar.bz2
-$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
+$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 $(WORK)/libmpfr-3.1.1-p2.patch.gz
tar -C $(WORK) -xvjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
+ cd $(WORK)/mpfr-$(LIBMPFR_VERSION) && \
+ gunzip -c $(WORK)/libmpfr-$(LIBMPFR_VERSION)-p2.patch.gz | patch -p1
touch $(WORK)/mpfr-$(LIBMPFR_VERSION)
$(WORK)/build-libmpfr: $(WORK)/mpfr-$(LIBMPFR_VERSION)
$(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
tar -C $(WORK) -xvjf $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
- cd $(WORK)/binutils-$(BINUTILS_VERSION) && \
- patch -p1 -i $(WORK)/binutils-$(BINUTILS_VERSION)-gnueabihf.patch
+ sed -i '/^SUBDIRS/s/doc//' $(WORK)/binutils-$(BINUTILS_VERSION)/*/Makefile.in
touch $(WORK)/binutils-$(BINUTILS_VERSION)
$(WORK)/build-binutils: $(WORK)/binutils-$(BINUTILS_VERSION)
--without-headers --enable-__cxa_atexit --enable-symvers=gnu --disable-decimal-float \
--disable-libgomp --disable-libmudflap --disable-libssp \
--with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
- --disable-shared --disable-threads --enable-languages=c \
+ --disable-shared --disable-threads --enable-languages=c --disable-libquadmath \
--with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \
make all-gcc all-target-libgcc && make install-gcc install-target-libgcc || exit 1
touch $(CROSSTOOLS)/lib/gcc
cd $(WORK)/glibc-$(GLIBC_VERSION) && \
tar xvjf $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 && \
mv glibc-ports-$(GLIBC_VERSION) ports && \
- patch -p1 -i $(WORK)/glibc-$(GLIBC_VERSION)-gnueabihf.patch && \
- patch -p1 -i $(WORK)/glibc-$(GLIBC_VERSION)-prelink.patch && \
- sed -e 's/-lgcc_eh//g' -i Makeconfig
+ sed -e 's/-lgcc_eh//g' -e 's/-lgcc_s//g' -i Makeconfig
touch $(WORK)/glibc-$(GLIBC_VERSION)
$(WORK)/build-glibc: $(WORK)/glibc-$(GLIBC_VERSION)
echo "libc_cv_forced_unwind=yes" > config.cache && \
echo "libc_cv_c_cleanup=yes" >> config.cache && \
echo "libc_cv_gnu89_inline=yes" >> config.cache && \
+ echo "libc_cv_ctors_header=yes" >> config.cache && \
echo "install_root=$(CLFS)" > configparms && \
unset CFLAGS && unset CXXFLAGS && \
BUILD_CC="gcc" CC="$(TARGET)-gcc" AR="$(TARGET)-ar" \
--build=$(HOST) --host=$(HOST) --target=$(TARGET) \
--with-headers=$(CLFS)/usr/include --enable-shared \
--disable-multilib --with-sysroot=$(CLFS) --disable-nls \
- --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix \
+ --enable-languages=c,c++ --enable-__cxa_atexit \
+ --enable-threads=posix --disable-libstdcxx-pch --disable-bootstrap --disable-libgomp \
--with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
--with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \
make AS_FOR_TARGET="$(TARGET)-as" LD_FOR_TARGET="$(TARGET)-ld" && \
--- /dev/null
+# Hardfp EfikaMX imx51
+ABI = aapcs-linux
+ARCH = armv7-a
+FPU = vfpv3-d16
+MODE = thumb
+FLOAT = hard
+
+# End of file
--- /dev/null
+# Generic hardfp toolchain
+ABI = aapcs-linux
+MODE = arm
+FLOAT = hard
--- /dev/null
+# Hardfp raspberrypi
+ABI = aapcs-linux
+ARCH = armv6zk
+FPU = vfp
+MODE = thumb
+FLOAT = hard
+
+# End of file
HOST = $(shell echo $$MACHTYPE | sed "s/$$(echo $$MACHTYPE | cut -d- -f2)/cross/")
TARGET = arm-crux-linux-gnueabihf
-PWD = $(shell pwd)
-CLFS = $(PWD)/clfs
-CROSSTOOLS = $(PWD)/crosstools
-WORK = $(PWD)/work
+TOPDIR = $(shell pwd)
+CLFS = $(TOPDIR)/clfs
+CROSSTOOLS = $(TOPDIR)/crosstools
+WORK = $(TOPDIR)/work
-KERNEL_HEADERS_VERSION = 2.6.35.6
-LIBGMP_VERSION = 5.0.2
-LIBMPFR_VERSION = 3.1.0
-LIBMPC_VERSION = 0.9
-BINUTILS_VERSION = 2.21.1
-GCC_VERSION = 4.6.1
-GLIBC_VERSION = 2.13
+KERNEL_HEADERS_VERSION = 3.5.4
+LIBGMP_VERSION = 5.0.5
+LIBMPFR_VERSION = 3.1.1
+LIBMPC_VERSION = 1.0.1
+BINUTILS_VERSION = 2.22
+GCC_VERSION = 4.7.2
+GLIBC_VERSION = 2.16.0
-# Hardfp EfikaMX imx51
-ABI = aapcs-linux
-ARCH = armv7-a
-FPU = vfpv3-d16
-MODE = thumb
-FLOAT = hard
+# Optimizations per device: generic/efikamx/raspberrypi
+DEVICE=generic
+include $(TOPDIR)/$(DEVICE).mk
# End of file
+++ /dev/null
-===================================================================
-RCS file: /cvs/src/src/ld/configure.tgt,v
-retrieving revision 1.244
-retrieving revision 1.245
-diff -u -r1.244 -r1.245
---- src/ld/configure.tgt 2011/04/07 01:19:22 1.244
-+++ src/ld/configure.tgt 2011/04/08 16:05:12 1.245
-@@ -71,7 +71,7 @@
- arm*-*-symbianelf*) targ_emul=armsymbian;;
- arm-*-kaos*) targ_emul=armelf ;;
- arm9e-*-elf) targ_emul=armelf ;;
--arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi
-+arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
- targ_extra_emuls=armelf_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-@@ -79,7 +79,7 @@
- targ_extra_emuls="armelfb armelf armelf_linux"
- targ_extra_libpath="armelf_linux"
- ;;
--arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi
-+arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
- targ_extra_emuls=armelfb_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-@@ -87,7 +87,7 @@
- targ_extra_emuls="armelf armelfb armelfb_linux"
- targ_extra_libpath="armelfb_linux"
- ;;
--arm*-*-uclinux*eabi) targ_emul=armelf_linux_eabi
-+arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi
- targ_extra_emuls=armelfb_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-
+++ /dev/null
-http://gcc.gnu.org/ml/gcc/2011-02/msg00390.html
-
-Triplet for ARM Linux HardFP ABI, again
-
- * From: Guillem Jover <guillem at debian dot org>
- * To: gcc at gcc dot gnu dot org
- * Date: Mon, 21 Feb 2011 11:12:09 +0100
- * Subject: Triplet for ARM Linux HardFP ABI, again
-
-
-diff --git a/configure b/configure
-index 501c6ff..43ff04f 100755
---- a/configure
-+++ b/configure
-diff --git a/configure b/configure
-index 501c6ff..43ff04f 100755
---- a/configure
-+++ b/configure
-@@ -3236,7 +3236,7 @@ case "${target}" in
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-*eabi*)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-diff --git a/configure.ac b/configure.ac
-index 9121d65..e1a42e0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -682,7 +682,7 @@ case "${target}" in
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-*eabi*)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
-index b64ba55..cbe6b70 100644
---- a/gcc/ada/gcc-interface/Makefile.in
-+++ b/gcc/ada/gcc-interface/Makefile.in
-@@ -1841,7 +1841,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
- LIBRARY_VERSION := $(LIB_VERSION)
- endif
-
--ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),)
-+ifeq ($(strip $(filter-out arm% linux%,$(arch) $(osys))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-linux.ads \
- s-inmaop.adb<s-inmaop-posix.adb \
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 54b822e..1a47343 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -820,13 +820,13 @@ arm*-*-linux*) # ARM GNU/Linux with ELF
- esac
- tmake_file="${tmake_file} t-linux arm/t-arm"
- case ${target} in
-- arm*-*-linux-*eabi)
-+ arm*-*-linux-*eabi*)
- tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
- tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
- tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
- # Define multilib configuration for arm-linux-androideabi.
- case ${target} in
-- *-androideabi)
-+ *-androideabi*)
- tmake_file="$tmake_file arm/t-linux-androideabi"
- ;;
- esac
-@@ -848,7 +848,7 @@ arm*-*-uclinux*) # ARM ucLinux
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
- tmake_file="arm/t-arm arm/t-arm-elf"
- case ${target} in
-- arm*-*-uclinux*eabi)
-+ arm*-*-uclinux*eabi*)
- tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
- tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
- tmake_file="$tmake_file arm/t-bpabi"
-diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index 02cb7ac..885c0e0 100644
---- a/gcc/testsuite/lib/target-supports.exp
-+++ b/gcc/testsuite/lib/target-supports.exp
-@@ -3219,7 +3219,7 @@ proc check_effective_target_sync_int_long { } {
- || [istarget i?86-*-*]
- || [istarget x86_64-*-*]
- || [istarget alpha*-*-*]
-- || [istarget arm*-*-linux-gnueabi]
-+ || [istarget arm*-*-linux-*eabi*]
- || [istarget bfin*-*linux*]
- || [istarget hppa*-*linux*]
- || [istarget s390*-*-*]
-@@ -3250,7 +3250,7 @@ proc check_effective_target_sync_char_short { } {
- || [istarget i?86-*-*]
- || [istarget x86_64-*-*]
- || [istarget alpha*-*-*]
-- || [istarget arm*-*-linux-gnueabi]
-+ || [istarget arm*-*-linux-*eabi*]
- || [istarget hppa*-*linux*]
- || [istarget s390*-*-*]
- || [istarget powerpc*-*-*]
-diff --git a/libjava/configure b/libjava/configure
-index f79e53b..47e3f23 100755
---- a/libjava/configure
-+++ b/libjava/configure
-@@ -20527,7 +20527,7 @@ case "${host}" in
- # on Darwin -single_module speeds up loading of the dynamic libraries.
- extra_ldflags_libjava=-Wl,-single_module
- ;;
--arm*linux*eabi)
-+arm*-*-linux-*eabi*)
- # Some of the ARM unwinder code is actually in libstdc++. We
- # could in principle replicate it in libgcj, but it's better to
- # have a dependency on libstdc++.
-diff --git a/libjava/configure.ac b/libjava/configure.ac
-index 8187eec..b59abb3 100644
---- a/libjava/configure.ac
-+++ b/libjava/configure.ac
-@@ -919,7 +919,7 @@ case "${host}" in
- # on Darwin -single_module speeds up loading of the dynamic libraries.
- extra_ldflags_libjava=-Wl,-single_module
- ;;
--arm*linux*eabi)
-+arm*-*-linux-*eabi*)
- # Some of the ARM unwinder code is actually in libstdc++. We
- # could in principle replicate it in libgcj, but it's better to
- # have a dependency on libstdc++.
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
-index e29404c..a2e58a9 100644
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -322,7 +322,7 @@ case "${host}" in
- fi
- esac
- case "${host}" in
-- arm*-*-linux-*eabi)
-+ arm*-*-linux-*eabi*)
- port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
- ;;
- esac
-diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
-index cb40b7b..6147d66 100644
---- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
-+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
-@@ -1,5 +1,5 @@
- // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" }
--// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } }
-+// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-*eabi* } }
-
- // 2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
- //
-diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
-index d71c012..1086a18 100644
---- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
-+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
-@@ -1,5 +1,5 @@
- // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" }
--// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } }
-+// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-*eabi* } }
-
- // 2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
- //
-
--- /dev/null
+diff -pruN gcc-4.7.2.orig/gcc/ada/gcc-interface/Makefile.in gcc-4.7.2/gcc/ada/gcc-interface/Makefile.in
+--- gcc-4.7.2.orig/gcc/ada/gcc-interface/Makefile.in 2012-08-06 14:34:27.000000000 +0000
++++ gcc-4.7.2/gcc/ada/gcc-interface/Makefile.in 2012-11-06 14:25:52.708613671 +0000
+@@ -1867,7 +1867,7 @@ ifeq ($(strip $(filter-out powerpc% linu
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
+-ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),)
++ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(arch) $(osys)-$(word 4,$(targ)))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-linux.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+diff -pruN gcc-4.7.2.orig/gcc/config.gcc gcc-4.7.2/gcc/config.gcc
+--- gcc-4.7.2.orig/gcc/config.gcc 2012-09-12 09:03:54.000000000 +0000
++++ gcc-4.7.2/gcc/config.gcc 2012-11-06 14:28:12.212618421 +0000
+@@ -850,12 +850,12 @@ arm*-*-linux*) # ARM GNU/Linux with EL
+ esac
+ tmake_file="${tmake_file} arm/t-arm"
+ case ${target} in
+- arm*-*-linux-*eabi)
++ arm*-*-linux-*eabi*)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # Define multilib configuration for arm-linux-androideabi.
+ case ${target} in
+- *-androideabi)
++ *-androideabi*)
+ tmake_file="$tmake_file arm/t-linux-androideabi"
+ ;;
+ esac
+@@ -877,7 +877,7 @@ arm*-*-uclinux*) # ARM ucLinux
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ case ${target} in
+- arm*-*-uclinux*eabi)
++ arm*-*-uclinux*eabi*)
+ tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
+ tmake_file="$tmake_file arm/t-bpabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+diff -pruN gcc-4.7.2.orig/gcc/testsuite/lib/target-supports.exp gcc-4.7.2/gcc/testsuite/lib/target-supports.exp
+--- gcc-4.7.2.orig/gcc/testsuite/lib/target-supports.exp 2012-08-10 13:21:31.000000000 +0000
++++ gcc-4.7.2/gcc/testsuite/lib/target-supports.exp 2012-11-06 14:34:38.076631560 +0000
+@@ -509,7 +509,7 @@ proc check_profiling_available { test_wh
+ # Some targets don't have any implementation of __bb_init_func or are
+ # missing other needed machinery.
+ if { [istarget am3*-*-linux*]
+- || [istarget arm*-*-eabi*]
++ || [istarget arm*-*-*eabi*]
+ || [istarget arm*-*-elf]
+ || [istarget arm*-*-symbianelf*]
+ || [istarget avr-*-*]
+@@ -528,7 +528,7 @@ proc check_profiling_available { test_wh
+ || [istarget mn10300-*-elf*]
+ || [istarget moxie-*-elf*]
+ || [istarget picochip-*-*]
+- || [istarget powerpc-*-eabi*]
++ || [istarget powerpc-*-eabi]
+ || [istarget powerpc-*-elf]
+ || [istarget rx-*-*]
+ || [istarget tic6x-*-elf]
+@@ -3860,7 +3860,7 @@ proc check_effective_target_sync_int_lon
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget alpha*-*-*]
+- || [istarget arm*-*-linux-gnueabi]
++ || [istarget arm*-*-linux-*eabi*]
+ || [istarget bfin*-*linux*]
+ || [istarget hppa*-*linux*]
+ || [istarget s390*-*-*]
+@@ -3890,7 +3890,7 @@ proc check_effective_target_sync_char_sh
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget alpha*-*-*]
+- || [istarget arm*-*-linux-gnueabi]
++ || [istarget arm*-*-linux-*eabi*]
+ || [istarget hppa*-*linux*]
+ || [istarget s390*-*-*]
+ || [istarget powerpc*-*-*]
+diff -pruN gcc-4.7.2.orig/libgcc/config.host gcc-4.7.2/libgcc/config.host
+--- gcc-4.7.2.orig/libgcc/config.host 2012-09-05 12:19:47.000000000 +0000
++++ gcc-4.7.2/libgcc/config.host 2012-11-06 14:29:57.164621996 +0000
+@@ -327,7 +327,7 @@ arm*-*-netbsdelf*)
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix"
+ case ${host} in
+- arm*-*-linux-*eabi)
++ arm*-*-linux-*eabi*)
+ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
+ tm_file="$tm_file arm/bpabi-lib.h"
+ unwind_header=config/arm/unwind-arm.h
+@@ -341,7 +341,7 @@ arm*-*-linux*) # ARM GNU/Linux with EL
+ arm*-*-uclinux*) # ARM ucLinux
+ tmake_file="${tmake_file} t-fixedpoint-gnu-prefix"
+ case ${host} in
+- arm*-*-uclinux*eabi)
++ arm*-*-uclinux*eabi*)
+ tmake_file="${tmake_file} arm/t-bpabi"
+ tm_file="$tm_file arm/bpabi-lib.h"
+ unwind_header=config/arm/unwind-arm.h
+diff -pruN gcc-4.7.2.orig/libjava/configure gcc-4.7.2/libjava/configure
+--- gcc-4.7.2.orig/libjava/configure 2012-09-20 07:23:55.000000000 +0000
++++ gcc-4.7.2/libjava/configure 2012-11-06 14:30:44.400623603 +0000
+@@ -20542,7 +20542,7 @@ case "${host}" in
+ # on Darwin -single_module speeds up loading of the dynamic libraries.
+ extra_ldflags_libjava=-Wl,-single_module
+ ;;
+-arm*linux*eabi)
++arm*linux*eabi*)
+ # Some of the ARM unwinder code is actually in libstdc++. We
+ # could in principle replicate it in libgcj, but it's better to
+ # have a dependency on libstdc++.
+diff -pruN gcc-4.7.2.orig/libjava/configure.ac gcc-4.7.2/libjava/configure.ac
+--- gcc-4.7.2.orig/libjava/configure.ac 2012-05-21 18:14:01.000000000 +0000
++++ gcc-4.7.2/libjava/configure.ac 2012-11-06 14:31:02.548624223 +0000
+@@ -931,7 +931,7 @@ case "${host}" in
+ # on Darwin -single_module speeds up loading of the dynamic libraries.
+ extra_ldflags_libjava=-Wl,-single_module
+ ;;
+-arm*linux*eabi)
++arm*linux*eabi*)
+ # Some of the ARM unwinder code is actually in libstdc++. We
+ # could in principle replicate it in libgcj, but it's better to
+ # have a dependency on libstdc++.
+diff -pruN gcc-4.7.2.orig/libstdc++-v3/configure.host gcc-4.7.2/libstdc++-v3/configure.host
+--- gcc-4.7.2.orig/libstdc++-v3/configure.host 2012-02-10 18:10:12.000000000 +0000
++++ gcc-4.7.2/libstdc++-v3/configure.host 2012-11-06 14:32:00.692626201 +0000
+@@ -340,7 +340,7 @@ case "${host}" in
+ fi
+ esac
+ case "${host}" in
+- arm*-*-linux-*eabi)
++ arm*-*-linux-*eabi*)
+ port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
+ ;;
+ esac
+++ /dev/null
---- glibc-2.13/ports/sysdeps/arm/preconfigure 2010-12-06 20:43:02.000000000 +0000
-+++ glibc-2.13.armhf//ports/sysdeps/arm/preconfigure 2011-05-06 15:57:15.087298361 +0000
-@@ -2,7 +2,7 @@
- arm*)
- base_machine=arm
- case $config_os in
-- linux-gnueabi)
-+ linux-gnueabi*)
- machine=arm/eabi/$machine
- if [ "${CFLAGS+set}" != "set" ]; then
- CFLAGS="-g -O2"
+++ /dev/null
-diff --git a/elf/rtld.c b/elf/rtld.c
-index 9a560b3..201c9cf 100644
---- a/elf/rtld.c
-+++ b/elf/rtld.c
-@@ -2168,6 +2168,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- we need it in the memory handling later. */
- GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
-
-+ /* Remember the last search directory added at startup, now that
-+ malloc will no longer be the one from dl-minimal.c. */
-+ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
-+
- if (prelinked)
- {
- if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
-@@ -2288,10 +2292,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- lossage);
- }
-
-- /* Remember the last search directory added at startup, now that
-- malloc will no longer be the one from dl-minimal.c. */
-- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
--
- if (! prelinked && rtld_multiple_ref)
- {
- /* There was an explicit ref to the dynamic linker as a shared lib.