]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gcc/gcc-3.3.3/arm-12527.dpatch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gcc / gcc-3.3.3 / arm-12527.dpatch
1 #! /bin/sh -e
2
3 dir=
4 if [ $# -eq 3 -a "$2" = '-d' ]; then
5     pdir="-d $3"
6     dir="$3/"
7 elif [ $# -ne 1 ]; then
8     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9     exit 1
10 fi
11 case "$1" in
12     -patch)
13         patch $pdir -f --no-backup-if-mismatch -p0 < $0
14         #cd ${dir}gcc && autoconf
15         ;;
16     -unpatch)
17         patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
18         #rm ${dir}gcc/configure
19         ;;
20     *)
21         echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22         exit 1
23 esac
24 exit 0
25
26 # DP: 2004-01-14  Richard Earnshaw  <rearnsha@arm.com>
27 # DP: 
28 # DP:   PR bootstrap/12527
29 # DP:   * config.gcc (arm*-*-linux*): Don't include unknown-elf.h in tm_file.
30 # DP:   Move linux-gas.h and linux-elf.h before aout.h.
31 # DP:   * arm/arm.h (INITIALIZE_TRAMPOLINE): Only define if not already.
32 # DP:   * arm/linux-elf.h (SUBTARGET_CPU_DEFAULT): Define.
33
34
35 --- gcc/config.gcc.orig 2004-01-21 07:45:04.000000000 +0100
36 +++ gcc/config.gcc      2004-02-05 23:17:56.000000000 +0100
37 @@ -698,7 +698,7 @@
38         use_collect2=yes
39         ;;
40  arm*-*-linux*)                 # ARM GNU/Linux with ELF
41 -       tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
42 +       tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
43         tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
44         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
45         gnu_ld=yes
46 --- gcc/config/arm/arm.h.orig   2003-08-12 07:46:29.000000000 +0200
47 +++ gcc/config/arm/arm.h        2004-02-05 23:14:03.000000000 +0100
48 @@ -1770,13 +1770,19 @@
49  /* Emit RTL insns to initialize the variable parts of a trampoline.
50     FNADDR is an RTX for the address of the function's pure code.
51     CXT is an RTX for the static chain value for the function.  */
52 -#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                                      \
53 -{                                                                                      \
54 -  emit_move_insn                                                                       \
55 -    (gen_rtx_MEM (SImode, plus_constant (TRAMP, TARGET_ARM ? 8 : 16)), CXT);           \
56 -  emit_move_insn                                                                       \
57 -    (gen_rtx_MEM (SImode, plus_constant (TRAMP, TARGET_ARM ? 12 : 20)),        FNADDR);        \
58 +#ifndef INITIALIZE_TRAMPOLINE
59 +#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                      \
60 +{                                                                      \
61 +  emit_move_insn (gen_rtx_MEM (SImode,                                 \
62 +                              plus_constant (TRAMP,                    \
63 +                                             TARGET_ARM ? 8 : 16)),    \
64 +                 CXT);                                                 \
65 +  emit_move_insn (gen_rtx_MEM (SImode,                                 \
66 +                              plus_constant (TRAMP,                    \
67 +                                             TARGET_ARM ? 12 : 20)),   \
68 +                 FNADDR);                                              \
69  }
70 +#endif
71  
72  \f
73  /* Addressing modes, and classification of registers for them.  */
74 --- gcc/config/arm/linux-elf.h.orig     2003-09-21 22:38:15.000000000 +0200
75 +++ gcc/config/arm/linux-elf.h  2004-02-05 23:14:03.000000000 +0100
76 @@ -34,6 +34,8 @@
77  #undef  TARGET_DEFAULT
78  #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
79  
80 +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
81 +
82  #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
83  
84  #undef  MULTILIB_DEFAULTS