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