Bug#621083: gcc-4.4 backport fix for new armhf triplet
This patch is a backport from 4.5/4.6 and fixes the build on armhf for 4.4.
Please consider including it in the next 4.4 version.
Thanks
Konstantinos
diff -ruN gcc-4.4-4.4.5/debian/patches/armhf-triplet-backport.diff gcc-4.4-4.4.5.armhf//debian/patches/armhf-triplet-backport.diff
--- gcc-4.4-4.4.5/debian/patches/armhf-triplet-backport.diff 1970-01-01 00:00:00.000000000 +0000
+++ gcc-4.4-4.4.5.armhf//debian/patches/armhf-triplet-backport.diff 2011-04-07 15:32:24.167298482 +0000
@@ -0,0 +1,121 @@
+# DP: add support for arm-linux-*eabi* triplets; useful for armhf
+
+Index: gcc-4.5-4.5.2/src/configure.ac
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/configure.ac 2011-03-18 19:10:48.804622758 +0000
++++ gcc-4.5-4.5.2/src/configure.ac 2011-03-18 19:11:18.324622793 +0000
+@@ -592,7 +592,7 @@
+ 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"
+Index: gcc-4.5-4.5.2/src/gcc/ada/gcc-interface/Makefile.in
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/gcc/ada/gcc-interface/Makefile.in 2011-03-18 19:11:37.296622753 +0000
++++ gcc-4.5-4.5.2/src/gcc/ada/gcc-interface/Makefile.in 2011-03-18 19:11:52.964621827 +0000
+@@ -1857,7 +1857,7 @@
+ 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)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-linux.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+Index: gcc-4.5-4.5.2/src/gcc/config.gcc
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/gcc/config.gcc 2011-03-18 19:12:05.128622749 +0000
++++ gcc-4.5-4.5.2/src/gcc/config.gcc 2011-03-18 19:12:52.960622752 +0000
+@@ -736,7 +736,7 @@
+ 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"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
+ # The BPABI long long divmod functions return a 128-bit value in
+@@ -757,7 +757,7 @@
+ 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
+Index: gcc-4.5-4.5.2/src/gcc/testsuite/lib/target-supports.exp
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/gcc/testsuite/lib/target-supports.exp 2011-03-18 19:13:48.604622749 +0000
++++ gcc-4.5-4.5.2/src/gcc/testsuite/lib/target-supports.exp 2011-03-18 19:14:24.132622629 +0000
+@@ -2593,7 +2593,7 @@
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget alpha*-*-*]
+- || [istarget arm*-*-linux-gnueabi]
++ || [istarget arm*-*-linux-*eabi*]
+ || [istarget s390*-*-*]
+ || [istarget powerpc*-*-*]
+ || [istarget sparc64-*-*]
+@@ -2622,7 +2622,7 @@
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget alpha*-*-*]
+- || [istarget arm*-*-linux-gnueabi]
++ || [istarget arm*-*-linux-*eabi*]
+ || [istarget s390*-*-*]
+ || [istarget powerpc*-*-*]
+ || [istarget sparc64-*-*]
+Index: gcc-4.5-4.5.2/src/libjava/configure.ac
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/libjava/configure.ac 2011-03-18 19:14:37.464622750 +0000
++++ gcc-4.5-4.5.2/src/libjava/configure.ac 2011-03-18 19:15:00.780622755 +0000
+@@ -920,7 +920,7 @@
+ # 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++.
+Index: gcc-4.5-4.5.2/src/libstdc++-v3/configure.host
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/libstdc++-v3/configure.host 2011-03-18 19:15:16.288622758 +0000
++++ gcc-4.5-4.5.2/src/libstdc++-v3/configure.host 2011-03-18 19:15:30.932622217 +0000
+@@ -325,7 +325,7 @@
+ 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
+Index: gcc-4.5-4.5.2/src/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc 2011-03-18 19:15:43.204622783 +0000
++++ gcc-4.5-4.5.2/src/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc 2011-03-18 19:16:06.324622740 +0000
+@@ -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>
+ //
+Index: gcc-4.5-4.5.2/src/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
+===================================================================
+--- gcc-4.5-4.5.2.orig/src/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc 2011-03-18 19:16:31.144622761 +0000
++++ gcc-4.5-4.5.2/src/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc 2011-03-18 19:16:41.420622950 +0000
+@@ -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 -ruN gcc-4.4-4.4.5/debian/rules.patch gcc-4.4-4.4.5.armhf//debian/rules.patch
--- gcc-4.4-4.4.5/debian/rules.patch 2011-04-07 15:35:34.000000000 +0000
+++ gcc-4.4-4.4.5.armhf//debian/rules.patch 2011-04-07 13:43:31.517298235 +0000
@@ -220,6 +220,7 @@
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf))
debian_patches += libjava-armel-unwind
debian_patches += $(if $(with_linaro_branch),,arm-gcc-gcse)
+ debian_patches += armhf-triplet-backport
endif
ifeq ($(distribution),Ubuntu)
# times out on the buildd
Reply to: