Package: gcc-4.1 Severity: wishlist Tags: patch User: debian-arm@lists.debian.org Usertags: eabi
Please add basic support for arm eabi[1] port. If includes fix for pr28516, defaulting for armv4t, and disabling java/objc and fortran for now on eabi. [1] http://wiki.debian.org/ArmEabiPort
diff -urN gcc-4.1-4.1.1ds2.orig/debian/patches/arm-pr28516.dpatch gcc-4.1-4.1.1ds2/debian/patches/arm-pr28516.dpatch --- gcc-4.1-4.1.1ds2.orig/debian/patches/arm-pr28516.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ gcc-4.1-4.1.1ds2/debian/patches/arm-pr28516.dpatch 2007-01-12 23:08:24.000000000 +0000 @@ -0,0 +1,43 @@ +#! /bin/sh -e + +# DP: Fix PR28516 on ARM + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055 ++++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056 +@@ -15415,6 +15415,15 @@ + /* Move from sp to reg. */ + asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); + } ++ else if (GET_CODE (e1) == PLUS ++ && GET_CODE (XEXP (e1, 0)) == REG ++ && REGNO (XEXP (e1, 0)) == SP_REGNUM ++ && GET_CODE (XEXP (e1, 1)) == CONST_INT) ++ { ++ /* Set reg to offset from sp. */ ++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", ++ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); ++ } + else + abort (); + break; diff -urN gcc-4.1-4.1.1ds2.orig/debian/patches/arm-unbreak-eabi-armv4t.dpatch gcc-4.1-4.1.1ds2/debian/patches/arm-unbreak-eabi-armv4t.dpatch --- gcc-4.1-4.1.1ds2.orig/debian/patches/arm-unbreak-eabi-armv4t.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ gcc-4.1-4.1.1ds2/debian/patches/arm-unbreak-eabi-armv4t.dpatch 2007-01-12 23:08:24.000000000 +0000 @@ -0,0 +1,37 @@ +#! /bin/sh -e + +# DP: Fix armv4t build on ARM + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h +--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700 ++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700 +@@ -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 + + #undef SUBTARGET_EXTRA_LINK_SPEC + #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" diff -urN gcc-4.1-4.1.1ds2.orig/debian/rules.defs gcc-4.1-4.1.1ds2/debian/rules.defs --- gcc-4.1-4.1.1ds2.orig/debian/rules.defs 2007-01-13 00:34:13.000000000 +0000 +++ gcc-4.1-4.1.1ds2/debian/rules.defs 2007-01-13 00:30:16.000000000 +0000 @@ -288,7 +288,7 @@ with_java := yes endif -java_no_cpus := #mips mipsel +java_no_cpus := armeb armel #mips mipsel java_no_systems := hurd-i386 knetbsd-gnu netbsdelf-gnu gcj_native_archs = alpha amd64 i386 ia64 mips mipsel powerpc s390 sparc @@ -383,7 +383,7 @@ # libffi ------------------- ifeq ($(with_common_libs),yes) with_libffi := yes - no_ffi_cpus := + no_ffi_cpus := armeb armel no_ffi_systems := netbsdelf-gnu ifneq ($(with_java),yes) ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(no_ffi_cpus))) @@ -408,7 +408,7 @@ with_fortran := yes endif -f95_no_cpus := +f95_no_cpus := armeb armel ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(f95_no_cpus))) with_fortran := disabled for architecure $(DEB_TARGET_ARCH_CPU) endif @@ -468,7 +468,7 @@ endif # these CPUs are not yet tested -pascal_no_cpus := alpha amd64 arm m68k mips mipsel s390 +pascal_no_cpus := alpha amd64 arm armeb armel m68k mips mipsel s390 pascal_no_systems := netbsdelf-gnu ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(pascal_no_cpus))) with_pascal := disabled for architecture $(DEB_TARGET_ARCH_CPU) @@ -503,7 +503,7 @@ with_objc_gc := yes # disable ObjC garbage collection library (needs libgc) -libgc_no_cpus := avr alpha amd64 arm armeb hppa i386 ia64 m68k mips mipsel powerpc s390 sparc +libgc_no_cpus := avr alpha amd64 arm armeb armel hppa i386 ia64 m68k mips mipsel powerpc s390 sparc libgc_no_systems := knetbsd-gnu ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(libgc_no_cpus))) with_objc_gc := disabled for architecture $(DEB_TARGET_ARCH_CPU) @@ -517,9 +517,7 @@ with_objc := disabled for cross compiler package endif endif -ifeq (objc, $(findstring objc,$(WITHOUT_LANG))) with_objc := disabled by environment -endif ifneq ($(with_objc),yes) with_objc_gc := $(with_objc) @@ -564,7 +562,7 @@ endif with_libgnat := yes -ada_no_cpus := arm armeb m32r m68k sh3 sh3eb sh4 sh4eb +ada_no_cpus := arm armeb armel m32r m68k sh3 sh3eb sh4 sh4eb ada_no_systems := hurd-i386 knetbsd-gnu netbsdelf-gnu ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(ada_no_cpus))) with_ada := disabled for architecure $(DEB_TARGET_ARCH_CPU) @@ -662,7 +660,7 @@ ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(check_no_systems))) with_check := disabled for $(DEB_TARGET_GNU_SYSTEM) endif -check_no_cpus := #m68k +check_no_cpus := armeb armel #m68k ifeq ($(DEB_TARGET_ARCH_CPU), $(findstring $(DEB_TARGET_ARCH_CPU),$(check_no_cpus))) with_check := disabled for architecure $(DEB_TARGET_ARCH_CPU) endif diff -urN gcc-4.1-4.1.1ds2.orig/debian/rules.patch gcc-4.1-4.1.1ds2/debian/rules.patch --- gcc-4.1-4.1.1ds2.orig/debian/rules.patch 2007-01-13 00:34:13.000000000 +0000 +++ gcc-4.1-4.1.1ds2/debian/rules.patch 2007-01-12 23:08:25.000000000 +0000 @@ -50,6 +50,8 @@ alpha-no-ev4-directive \ arm-libffi \ arm-gij \ + arm-pr28516 \ + arm-unbreak-eabi-armv4t \ hppa-cbranch \ hppa-cbranch2 \ m68k-fjump \