CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gcc: Fixed preprocessor symbols.
[ports/core-arm.git] / gcc / gcc-4.5.3-preprocessor_symbol.patch
1 --- gcc-4.5.3.orig//gcc/config/arm/arm.c 2011-07-14 17:25:05.000000000 +0000
2 +++ gcc-4.5.3//gcc/config/arm/arm.c 2011-07-14 17:31:26.000000000 +0000
3 @@ -700,7 +700,7 @@ static int after_arm_reorg = 0;
4 /* The maximum number of insns to be used when loading a constant. */
5 static int arm_constant_limit = 3;
6
7 -static enum arm_pcs arm_pcs_default;
8 +enum arm_pcs arm_pcs_default;
9
10 /* For an explanation of these variables, see final_prescan_insn below. */
11 int arm_ccfsm_state;
12
13 --- gcc-4.5.3.orig//gcc/config/arm/arm.h.orig 2011-07-21 12:25:47.886316123 +0200
14 +++ gcc-4.5.3//gcc/config/arm/arm.h 2011-07-21 12:27:44.096316245 +0200
15 @@ -94,8 +94,14 @@
16 if (arm_arch_iwmmxt) \
17 builtin_define ("__IWMMXT__"); \
18 if (TARGET_AAPCS_BASED) \
19 - builtin_define ("__ARM_EABI__"); \
20 - } while (0)
21 + { \
22 + if (arm_pcs_default == ARM_PCS_AAPCS_VFP) \
23 + builtin_define ("__ARM_PCS_VFP"); \
24 + else if (arm_pcs_default == ARM_PCS_AAPCS) \
25 + builtin_define ("__ARM_PCS"); \
26 + builtin_define ("__ARM_EABI__"); \
27 + } \
28 + } while (0)
29
30 /* The various ARM cores. */
31 enum processor_type
32 @@ -1648,6 +1654,9 @@
33 ARM_PCS_UNKNOWN
34 };
35
36 +/* Default procedure calling standard of current compilation unit. */
37 +extern enum arm_pcs arm_pcs_default;
38 +
39 /* A C type for declaring a variable that is used as the first argument of
40 `FUNCTION_ARG' and other related values. */
41 typedef struct