1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff -urx '*.orig' gcc-4.0.3.orig/gcc/config/arm/elf.h gcc-4.0.3/gcc/config/arm/elf.h
--- gcc-4.0.3.orig/gcc/config/arm/elf.h	2007-08-02 06:49:31.000000000 -0400
+++ gcc-4.0.3/gcc/config/arm/elf.h	2009-07-12 09:17:47.000000000 -0400
@@ -39,9 +39,8 @@
   { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC },
 #endif

-#ifndef SUBTARGET_EXTRA_ASM_SPEC
-#define SUBTARGET_EXTRA_ASM_SPEC ""
-#endif
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4}"

 #ifndef SUBTARGET_ASM_FLOAT_SPEC
 #define SUBTARGET_ASM_FLOAT_SPEC "\
diff -urx '*.orig' gcc-4.0.3.orig/gcc/config/arm/t-arm-elf gcc-4.0.3/gcc/config/arm/t-arm-elf
--- gcc-4.0.3.orig/gcc/config/arm/t-arm-elf	2007-01-03 18:48:10.000000000 -0500
+++ gcc-4.0.3/gcc/config/arm/t-arm-elf	2009-07-12 09:18:33.000000000 -0400
@@ -21,6 +21,16 @@
 #MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
 #MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3

+# We build a lib for each specific CPU Rockbox targets.  If anyone knows a better
+# way to do this, please let us know.
+MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm9e/mcpu=arm926ej-s/mcpu=arm1136jf-s
+MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm9e arm926ej-s arm1136jf-s
+MULTILIB_OPTIONS     += mlittle-endian/mbig-endian
+MULTILIB_DIRNAMES    += le be
+MULTILIB_MATCHES     += mbig-endian=mbe mlittle-endian=mle
+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES   += normal interwork
+
 # MULTILIB_OPTIONS    += mcpu=ep9312
 # MULTILIB_DIRNAMES   += ep9312
 # MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*