diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-03-17 21:41:22 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-03-17 21:41:22 +0100 |
commit | c58cc7d3796dcee6e93885c835ed04cb566abeb2 (patch) | |
tree | 3eea4d4ef6a4ef79e0f4e025d7012c1a5cc38835 /meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch | |
parent | eec6ab97f712e06eb52c9f7c99e19ffab3ce9d74 (diff) | |
download | meta-openembedded-c58cc7d3796dcee6e93885c835ed04cb566abeb2.tar.gz |
move layer into meta-oe in preparation for future splits
As per TSC decision
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch')
-rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch new file mode 100644 index 000000000..80eebeec0 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99444.patch | |||
@@ -0,0 +1,183 @@ | |||
1 | 2010-12-02 Bernd Schmidt <bernds@codesourcery.com> | ||
2 | |||
3 | Issue #10089 | ||
4 | |||
5 | gcc/ | ||
6 | * expr.c (store_field): Avoid a direct store if the mode is larger | ||
7 | than the size of the bit field. | ||
8 | * stor-layout.c (layout_decl): If flag_strict_volatile_bitfields, | ||
9 | treat non-volatile bit fields like volatile ones. | ||
10 | * toplev.c (process_options): Disallow combination of | ||
11 | -fstrict-volatile-bitfields and ABI versions less than 2. | ||
12 | * config/arm/arm.c (arm_option_override): Don't enable | ||
13 | flag_strict_volatile_bitfields if the ABI version is less than 2. | ||
14 | * config/h8300/h8300.c (h8300_option_override): Likewise. | ||
15 | * config/rx/rx.c (rx_option_override): Likewise. | ||
16 | * config/m32c/m32c.c (m32c_option_override): Likewise. | ||
17 | * config/sh/sh.c (sh_option_override): Likewise. | ||
18 | |||
19 | gcc/testsuite/ | ||
20 | * gcc.target/arm/volatile-bitfields-4.c: New test. | ||
21 | * c-c++-common/abi-bf.c: New test. | ||
22 | |||
23 | === modified file 'gcc/config/arm/arm.c' | ||
24 | --- old/gcc/config/arm/arm.c 2010-12-10 15:30:47 +0000 | ||
25 | +++ new/gcc/config/arm/arm.c 2010-12-10 15:34:19 +0000 | ||
26 | @@ -1934,7 +1934,8 @@ | ||
27 | set_param_value ("gcse-unrestricted-cost", 2); | ||
28 | |||
29 | /* ARM EABI defaults to strict volatile bitfields. */ | ||
30 | - if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0) | ||
31 | + if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0 | ||
32 | + && abi_version_at_least(2)) | ||
33 | flag_strict_volatile_bitfields = 1; | ||
34 | |||
35 | /* Register global variables with the garbage collector. */ | ||
36 | |||
37 | === modified file 'gcc/config/h8300/h8300.c' | ||
38 | --- old/gcc/config/h8300/h8300.c 2010-11-04 12:43:52 +0000 | ||
39 | +++ new/gcc/config/h8300/h8300.c 2010-12-10 15:34:19 +0000 | ||
40 | @@ -405,7 +405,7 @@ | ||
41 | } | ||
42 | |||
43 | /* This target defaults to strict volatile bitfields. */ | ||
44 | - if (flag_strict_volatile_bitfields < 0) | ||
45 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2)) | ||
46 | flag_strict_volatile_bitfields = 1; | ||
47 | } | ||
48 | |||
49 | |||
50 | === modified file 'gcc/config/m32c/m32c.c' | ||
51 | --- old/gcc/config/m32c/m32c.c 2010-11-04 12:43:52 +0000 | ||
52 | +++ new/gcc/config/m32c/m32c.c 2010-12-10 15:34:19 +0000 | ||
53 | @@ -430,7 +430,7 @@ | ||
54 | flag_ivopts = 0; | ||
55 | |||
56 | /* This target defaults to strict volatile bitfields. */ | ||
57 | - if (flag_strict_volatile_bitfields < 0) | ||
58 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2)) | ||
59 | flag_strict_volatile_bitfields = 1; | ||
60 | } | ||
61 | |||
62 | |||
63 | === modified file 'gcc/config/rx/rx.c' | ||
64 | --- old/gcc/config/rx/rx.c 2010-11-04 12:43:52 +0000 | ||
65 | +++ new/gcc/config/rx/rx.c 2010-12-10 15:34:19 +0000 | ||
66 | @@ -2191,7 +2191,7 @@ | ||
67 | rx_option_override (void) | ||
68 | { | ||
69 | /* This target defaults to strict volatile bitfields. */ | ||
70 | - if (flag_strict_volatile_bitfields < 0) | ||
71 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2)) | ||
72 | flag_strict_volatile_bitfields = 1; | ||
73 | } | ||
74 | |||
75 | |||
76 | === modified file 'gcc/config/sh/sh.c' | ||
77 | --- old/gcc/config/sh/sh.c 2010-11-04 12:43:52 +0000 | ||
78 | +++ new/gcc/config/sh/sh.c 2010-12-10 15:34:19 +0000 | ||
79 | @@ -952,7 +952,7 @@ | ||
80 | sh_fix_range (sh_fixed_range_str); | ||
81 | |||
82 | /* This target defaults to strict volatile bitfields. */ | ||
83 | - if (flag_strict_volatile_bitfields < 0) | ||
84 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2)) | ||
85 | flag_strict_volatile_bitfields = 1; | ||
86 | } | ||
87 | |||
88 | |||
89 | === modified file 'gcc/expr.c' | ||
90 | --- old/gcc/expr.c 2010-11-04 12:43:52 +0000 | ||
91 | +++ new/gcc/expr.c 2010-12-10 15:34:19 +0000 | ||
92 | @@ -5848,6 +5848,8 @@ | ||
93 | || bitpos % GET_MODE_ALIGNMENT (mode)) | ||
94 | && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target))) | ||
95 | || (bitpos % BITS_PER_UNIT != 0))) | ||
96 | + || (bitsize >= 0 && mode != BLKmode | ||
97 | + && GET_MODE_BITSIZE (mode) > bitsize) | ||
98 | /* If the RHS and field are a constant size and the size of the | ||
99 | RHS isn't the same size as the bitfield, we must use bitfield | ||
100 | operations. */ | ||
101 | |||
102 | === modified file 'gcc/stor-layout.c' | ||
103 | --- old/gcc/stor-layout.c 2010-11-26 12:03:32 +0000 | ||
104 | +++ new/gcc/stor-layout.c 2010-12-10 15:34:19 +0000 | ||
105 | @@ -621,12 +621,13 @@ | ||
106 | /* See if we can use an ordinary integer mode for a bit-field. | ||
107 | Conditions are: a fixed size that is correct for another mode, | ||
108 | occupying a complete byte or bytes on proper boundary, | ||
109 | - and not volatile or not -fstrict-volatile-bitfields. */ | ||
110 | + and not -fstrict-volatile-bitfields. If the latter is set, | ||
111 | + we unfortunately can't check TREE_THIS_VOLATILE, as a cast | ||
112 | + may make a volatile object later. */ | ||
113 | if (TYPE_SIZE (type) != 0 | ||
114 | && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST | ||
115 | && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT | ||
116 | - && !(TREE_THIS_VOLATILE (decl) | ||
117 | - && flag_strict_volatile_bitfields > 0)) | ||
118 | + && flag_strict_volatile_bitfields <= 0) | ||
119 | { | ||
120 | enum machine_mode xmode | ||
121 | = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1); | ||
122 | |||
123 | === added file 'gcc/testsuite/c-c++-common/abi-bf.c' | ||
124 | --- old/gcc/testsuite/c-c++-common/abi-bf.c 1970-01-01 00:00:00 +0000 | ||
125 | +++ new/gcc/testsuite/c-c++-common/abi-bf.c 2010-12-10 15:34:19 +0000 | ||
126 | @@ -0,0 +1,3 @@ | ||
127 | +/* { dg-warning "incompatible" } */ | ||
128 | +/* { dg-do compile } */ | ||
129 | +/* { dg-options "-fstrict-volatile-bitfields -fabi-version=1" } */ | ||
130 | |||
131 | === added file 'gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c' | ||
132 | --- old/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c 1970-01-01 00:00:00 +0000 | ||
133 | +++ new/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c 2010-12-10 15:34:19 +0000 | ||
134 | @@ -0,0 +1,30 @@ | ||
135 | +/* { dg-require-effective-target arm_eabi } */ | ||
136 | +/* { dg-do compile } */ | ||
137 | +/* { dg-options "-O2" } */ | ||
138 | +/* { dg-final { scan-assembler-times "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */ | ||
139 | +/* { dg-final { scan-assembler-times "str\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */ | ||
140 | +/* { dg-final { scan-assembler-not "strb" } } */ | ||
141 | + | ||
142 | +struct thing { | ||
143 | + unsigned a: 8; | ||
144 | + unsigned b: 8; | ||
145 | + unsigned c: 8; | ||
146 | + unsigned d: 8; | ||
147 | +}; | ||
148 | + | ||
149 | +struct thing2 { | ||
150 | + volatile unsigned a: 8; | ||
151 | + volatile unsigned b: 8; | ||
152 | + volatile unsigned c: 8; | ||
153 | + volatile unsigned d: 8; | ||
154 | +}; | ||
155 | + | ||
156 | +void test1(volatile struct thing *t) | ||
157 | +{ | ||
158 | + t->a = 5; | ||
159 | +} | ||
160 | + | ||
161 | +void test2(struct thing2 *t) | ||
162 | +{ | ||
163 | + t->a = 5; | ||
164 | +} | ||
165 | |||
166 | === modified file 'gcc/toplev.c' | ||
167 | --- old/gcc/toplev.c 2010-03-31 01:44:10 +0000 | ||
168 | +++ new/gcc/toplev.c 2010-12-10 15:34:19 +0000 | ||
169 | @@ -1851,6 +1851,13 @@ | ||
170 | sorry ("Graphite loop optimizations cannot be used"); | ||
171 | #endif | ||
172 | |||
173 | + if (flag_strict_volatile_bitfields > 0 && !abi_version_at_least (2)) | ||
174 | + { | ||
175 | + warning (0, "-fstrict-volatile-bitfield disabled; " | ||
176 | + "it is incompatible with ABI versions < 2"); | ||
177 | + flag_strict_volatile_bitfields = 0; | ||
178 | + } | ||
179 | + | ||
180 | /* Unrolling all loops implies that standard loop unrolling must also | ||
181 | be done. */ | ||
182 | if (flag_unroll_all_loops) | ||
183 | |||