]>
Commit | Line | Data |
---|---|---|
312cf8f5 | 1 | # |
8449b592 JR |
2 | # Conditional build: |
3 | %bcond_with bootstrap # for bootstraping | |
4 | # | |
281bac7a | 5 | Summary: Cross AVR GNU binary utility development utilities - gcc |
c7d51c5d ER |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR gcc |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - AVR gcc | |
40ea5eb2 | 11 | Name: crossavr-gcc |
6ef8d480 | 12 | Version: 4.6.2 |
ab7f78a4 | 13 | Release: 5 |
40ea5eb2 | 14 | Epoch: 1 |
6ef8d480 | 15 | Patch1: gcc-bug51969.patch |
ab7f78a4 | 16 | # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.1.830 |
6ef8d480 PZ |
17 | Patch100: 200-gcc-libiberty-Makefile.in.patch |
18 | Patch101: 300-gcc-fixedpoint-3-4-2010.patch | |
19 | Patch102: 301-gcc-xmega-v14.patch | |
20 | Patch103: 302-gcc-avrtiny10.patch | |
21 | Patch104: 303-gcc-osmain.patch | |
22 | Patch105: 304-gcc-builtins-v6.patch | |
23 | Patch106: 305-gcc-avrtiny10-non-fixedpoint.patch | |
24 | Patch107: 306-gcc-option-list-devices.patch | |
ab7f78a4 PZ |
25 | Patch108: 307-gcc-avrtc536.patch |
26 | Patch109: 308-gcc-avrtc537.patch | |
27 | Patch110: 400-gcc-new-devices.patch | |
28 | Patch111: 401-gcc-atmega32_5_50_90_pa.patch | |
29 | Patch112: 402-gcc-attiny1634.patch | |
30 | Patch113: 403-gcc-atmega48pa.patch | |
31 | Patch114: 404-gcc-atxmega_16_32_a4u.patch | |
32 | Patch115: 405-gcc-atxmega64_128_192_256a3u.patch | |
33 | Patch116: 406-gcc-atmegarfr2_a2.patch | |
34 | Patch117: 407-gcc-atmega165pa.patch | |
35 | Patch118: 408-gcc-atxmega384c3.patch | |
36 | Patch119: 410-gcc-atxmega128a4u.patch | |
37 | Patch120: 411-gcc-atxmega64d4.patch | |
38 | Patch121: 412-gcc-atmega164pa_168pa_32a_64a.patch | |
39 | Patch122: 413-gcc-atxmega64_128_b3.patch | |
40 | Patch123: 414-gcc-atxmega64b1.patch | |
41 | Patch124: 415-gcc-atmega_8a_128a_1284.patch | |
42 | Patch125: 416-gcc-atxmega64a4u.patch | |
43 | Patch126: 417-gcc-atxmega128d4.patch | |
44 | Patch127: 418-gcc-atmxt336s.patch | |
45 | Patch128: 419-gcc-atxmega16c4_32c4_128c3_256c3.patch | |
46 | Patch129: 420-gcc-atxmega384d3.patch | |
47 | Patch130: 421-gcc-atmega48hvf.patch | |
48 | Patch131: 422-gcc-atmega26hvg.patch | |
49 | Patch132: 423-gcc-atmxt224_224e.patch | |
50 | Patch133: 424-gcc-atxmega192c3.patch | |
51 | Patch134: 425-gcc-atmxt112sl.patch | |
52 | Patch135: 426-gcc-atxmega64c3.patch | |
53 | Patch136: 427-gcc-ata6285_6286.patch | |
54 | Patch137: 428-gcc-attiny828.patch | |
55 | Patch138: 429-gcc-ata5790_5790n_5795.patch | |
56 | Patch139: 430-gcc-ata5272_ata5505.patch | |
57 | Patch140: 431-gcc-atmxt540s.patch | |
58 | Patch141: 432-gcc-ata5831.patch | |
59 | Patch142: 433-gcc-attiny841.patch | |
60 | Patch143: 434-gcc-atxmega32_16_8e5.patch | |
61 | Patch144: 500-gcc-bug13473.patch | |
62 | Patch145: 501-gcc-avrtiny10-bug-12510.patch | |
63 | Patch146: 502-gcc-bug12915.patch | |
64 | Patch147: 503-gcc-bug13789.patch | |
65 | Patch148: 504-gcc-conditional-register.patch | |
66 | Patch149: 505-gcc-avrtc381-tiny.patch | |
67 | Patch150: 506-gcc-avrtc541.patch | |
68 | Patch151: 507-gcc-avrtc-518.patch | |
69 | Patch152: 508-gcc-avrtc514-tiny.patch | |
70 | Patch153: 509-gcc-AVRTC-544-call-used-registers-tiny10.patch | |
71 | Patch154: 510-gcc-avrtc496-tiny.patch | |
72 | Patch155: 511-gcc-avrtc539-backported.patch | |
73 | Patch156: 512-gcc-avrtc542.patch | |
74 | Patch157: 513-gcc-avrtc556-tiny-same-base-and-dest.patch | |
75 | Patch158: 514-gcc-avrtc558.patch | |
76 | Patch159: 515-gcc-avrtc446.patch | |
40ea5eb2 WK |
77 | License: GPL |
78 | Group: Development/Languages | |
6b88a121 | 79 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
6ef8d480 | 80 | # Source0-md5: 028115c4fbfb6cfd75d6369f4a90d87e |
40ea5eb2 | 81 | BuildRequires: /bin/bash |
f323cece | 82 | BuildRequires: autoconf |
fdd61bcf JB |
83 | BuildRequires: bison |
84 | BuildRequires: crossavr-binutils | |
dbe7ab63 | 85 | BuildRequires: elfutils-devel >= 0.145-1 |
fdd61bcf | 86 | BuildRequires: flex |
328c429b | 87 | BuildRequires: gmp-devel >= 4.1 |
dbe7ab63 | 88 | BuildRequires: libmpc-devel |
328c429b | 89 | BuildRequires: mpfr-devel >= 2.3.0 |
2a46c025 | 90 | BuildRequires: perl-tools-pod |
59c2e2e2 | 91 | BuildRequires: rpmbuild(macros) >= 1.565 |
92 | BuildRequires: sed >= 4.0 | |
78067d97 | 93 | Requires: crossavr-binutils >= 2.15.91.0.2 |
328c429b | 94 | %{!?with_bootstrap:Requires: crossavr-libc} |
c2bc48fa | 95 | Requires: gcc-dirs |
40ea5eb2 WK |
96 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
97 | ||
40ea5eb2 | 98 | %define target avr |
40ea5eb2 | 99 | %define arch %{_prefix}/%{target} |
df3c6f23 JB |
100 | %define gccarch %{_libdir}/gcc/%{target} |
101 | %define gcclib %{_libdir}/gcc/%{target}/%{version} | |
ef8212dd | 102 | %define _noautostrip .*%{gcclib}.*/libgc.*\\.a |
40ea5eb2 | 103 | |
8449b592 JR |
104 | # functions with printf format attribute but with special parser and also |
105 | # receiving non constant format strings | |
106 | %define Werror_cflags %{nil} | |
107 | ||
40ea5eb2 WK |
108 | %description |
109 | This package contains a cross-gcc which allows the creation of | |
7f5526fe | 110 | binaries to be run on Atmel AVR on other machines. |
40ea5eb2 | 111 | |
76648510 | 112 | %description -l de.UTF-8 |
113 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
114 | anderem Rechner Code für Atmel AVR zu generieren. | |
40ea5eb2 | 115 | |
76648510 | 116 | %description -l pl.UTF-8 |
117 | Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych | |
118 | maszynach binariów do uruchamiania na Atmel AVR. | |
40ea5eb2 | 119 | |
1c790698 | 120 | %package c++ |
fdd61bcf | 121 | Summary: C++ support for avr-gcc |
c7d51c5d | 122 | Summary(pl.UTF-8): Obsługa C++ dla avr-gcc |
fdd61bcf | 123 | Group: Development/Languages |
aaeaf91a | 124 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1c790698 | 125 | |
126 | %description c++ | |
127 | This package adds C++ support to the GNU Compiler Collection for AVR. | |
128 | ||
76648510 | 129 | %description c++ -l pl.UTF-8 |
130 | Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR. | |
1c790698 | 131 | |
40ea5eb2 WK |
132 | %prep |
133 | %setup -q -n gcc-%{version} | |
59c2e2e2 | 134 | cd gcc/config/%{target} && %undos -f c,h && cd - |
6ef8d480 | 135 | %patch1 -p2 |
dbe7ab63 | 136 | %patch100 -p0 |
137 | %patch101 -p0 | |
138 | %patch102 -p0 | |
139 | %patch103 -p0 | |
140 | %patch104 -p0 | |
141 | %patch105 -p0 | |
142 | %patch106 -p0 | |
143 | %patch107 -p0 | |
144 | %patch108 -p0 | |
145 | %patch109 -p0 | |
146 | %patch110 -p0 | |
147 | %patch111 -p0 | |
148 | %patch112 -p0 | |
149 | %patch113 -p0 | |
150 | %patch114 -p0 | |
151 | %patch115 -p0 | |
152 | %patch116 -p0 | |
153 | %patch117 -p0 | |
154 | %patch118 -p0 | |
155 | %patch119 -p0 | |
156 | %patch120 -p0 | |
157 | %patch121 -p0 | |
158 | %patch122 -p0 | |
159 | %patch123 -p0 | |
160 | %patch124 -p0 | |
161 | %patch125 -p0 | |
162 | %patch126 -p0 | |
163 | %patch127 -p0 | |
164 | %patch128 -p0 | |
165 | %patch129 -p0 | |
166 | %patch130 -p0 | |
167 | %patch131 -p0 | |
168 | %patch132 -p0 | |
169 | %patch133 -p0 | |
170 | %patch134 -p0 | |
171 | %patch135 -p0 | |
172 | %patch136 -p0 | |
173 | %patch137 -p0 | |
174 | %patch138 -p0 | |
175 | %patch139 -p0 | |
176 | %patch140 -p0 | |
177 | %patch141 -p0 | |
6ef8d480 PZ |
178 | %patch142 -p0 |
179 | %patch143 -p0 | |
180 | %patch144 -p0 | |
ab7f78a4 PZ |
181 | %patch145 -p0 |
182 | %patch146 -p0 | |
183 | %patch147 -p0 | |
184 | %patch148 -p0 | |
185 | %patch149 -p0 | |
186 | %patch150 -p0 | |
187 | %patch151 -p0 | |
188 | %patch152 -p0 | |
189 | %patch153 -p0 | |
190 | %patch154 -p0 | |
191 | %patch155 -p0 | |
192 | %patch156 -p0 | |
193 | %patch157 -p0 | |
194 | %patch158 -p0 | |
195 | %patch159 -p0 | |
40ea5eb2 WK |
196 | |
197 | %build | |
198 | rm -rf obj-%{target} | |
199 | install -d obj-%{target} | |
200 | cd obj-%{target} | |
201 | ||
202 | CFLAGS="%{rpmcflags}" \ | |
203 | CXXFLAGS="%{rpmcflags}" \ | |
fdd61bcf JB |
204 | TEXCONFIG=false \ |
205 | ../configure \ | |
40ea5eb2 WK |
206 | --prefix=%{_prefix} \ |
207 | --infodir=%{_infodir} \ | |
208 | --mandir=%{_mandir} \ | |
df3c6f23 JB |
209 | --bindir=%{_bindir} \ |
210 | --libdir=%{_libdir} \ | |
211 | --libexecdir=%{_libdir} \ | |
dbe7ab63 | 212 | --enable-c99 \ |
213 | --enable-languages="c,c++" \ | |
214 | --enable-long-long \ | |
215 | --enable-lto \ | |
40ea5eb2 | 216 | --disable-shared \ |
69b7b918 | 217 | --disable-libssp \ |
391a0dd0 | 218 | --with-dwarf2 \ |
40ea5eb2 WK |
219 | --with-gnu-as \ |
220 | --with-gnu-ld \ | |
221 | --with-system-zlib \ | |
222 | --with-multilib \ | |
223 | --without-x \ | |
ef8212dd JB |
224 | --build=%{_target_platform} \ |
225 | --host=%{_target_platform} \ | |
40ea5eb2 WK |
226 | --target=%{target} |
227 | ||
69b7b918 | 228 | %{__make} CFLAGS_FOR_TARGET="-Os" |
40ea5eb2 WK |
229 | |
230 | %install | |
231 | rm -rf $RPM_BUILD_ROOT | |
40ea5eb2 | 232 | |
ef8212dd | 233 | %{__make} -C obj-%{target} install \ |
40ea5eb2 WK |
234 | DESTDIR=$RPM_BUILD_ROOT |
235 | ||
328c429b | 236 | # move fixed includes to proper place |
237 | cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include | |
238 | ||
ef8212dd JB |
239 | # don't want it here |
240 | rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
f323cece ER |
241 | rm -rf $RPM_BUILD_ROOT%{_infodir} |
242 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7 | |
243 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7 | |
244 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7 | |
245 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo | |
328c429b | 246 | rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed |
f323cece | 247 | rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools |
6ef8d480 | 248 | rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la |
40ea5eb2 | 249 | |
ef8212dd | 250 | %if 0%{!?debug:1} |
df3c6f23 JB |
251 | # strip target libraries |
252 | %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a | |
253 | %endif | |
1c790698 | 254 | |
40ea5eb2 WK |
255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
f323cece | 258 | %files |
40ea5eb2 | 259 | %defattr(644,root,root,755) |
1c790698 | 260 | %attr(755,root,root) %{_bindir}/%{target}-gcc* |
261 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
262 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
40ea5eb2 WK |
263 | %dir %{gccarch} |
264 | %dir %{gcclib} | |
265 | %attr(755,root,root) %{gcclib}/cc1 | |
40ea5eb2 | 266 | %attr(755,root,root) %{gcclib}/collect2 |
dbe7ab63 | 267 | %attr(755,root,root) %{gcclib}/lto-wrapper |
268 | %attr(755,root,root) %{gcclib}/lto1 | |
6ef8d480 | 269 | %attr(755,root,root) %{gcclib}/liblto_plugin.so* |
df3c6f23 | 270 | %{gcclib}/libg*.a |
f1442436 | 271 | %{gcclib}/%{target}* |
dbe7ab63 | 272 | %{gcclib}/plugin |
40ea5eb2 WK |
273 | %dir %{gcclib}/include |
274 | %{gcclib}/include/*.h | |
df3c6f23 | 275 | %{_mandir}/man1/%{target}-cpp.1* |
40ea5eb2 | 276 | %{_mandir}/man1/%{target}-gcc.1* |
df3c6f23 | 277 | %{_mandir}/man1/%{target}-gcov.1* |
1c790698 | 278 | |
279 | %files c++ | |
280 | %defattr(644,root,root,755) | |
281 | %attr(755,root,root) %{_bindir}/%{target}-g++ | |
282 | %attr(755,root,root) %{_bindir}/%{target}-c++ | |
283 | %attr(755,root,root) %{gcclib}/cc1plus | |
284 | %{_mandir}/man1/%{target}-g++.1* |