3 %bcond_with bootstrap # for bootstraping
5 Summary: Cross AVR GNU binary utility development utilities - gcc
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
15 Patch1: gcc-bug51969.patch
16 # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.0.663.
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
25 Patch108: 400-gcc-new-devices.patch
26 Patch109: 401-gcc-atmega32_5_50_90_pa.patch
27 Patch110: 402-gcc-attiny1634.patch
28 Patch111: 403-gcc-atmega48pa.patch
29 Patch112: 404-gcc-atxmega_16_32_a4u.patch
30 Patch113: 405-gcc-atxmega64_128_192_256a3u.patch
31 Patch114: 406-gcc-atmegarfr2_a2.patch
32 Patch115: 407-gcc-atmega165pa.patch
33 Patch116: 408-gcc-atxmega384c3.patch
34 Patch117: 409-gcc-attiny80.patch
35 Patch118: 410-gcc-atxmega128a4u.patch
36 Patch119: 411-gcc-atxmega64d4.patch
37 Patch120: 412-gcc-atmega164pa_168pa_32a_64a.patch
38 Patch121: 413-gcc-atxmega64_128_b3.patch
39 Patch122: 414-gcc-atxmega64b1.patch
40 Patch123: 415-gcc-atmega_8a_128a_1284.patch
41 Patch124: 416-gcc-atxmega64a4u.patch
42 Patch125: 417-gcc-atxmega128d4.patch
43 Patch126: 418-gcc-atmxt336s.patch
44 Patch127: 419-gcc-atxmega16c4_32c4_128c3_256c3.patch
45 Patch128: 420-gcc-atxmega384d3.patch
46 Patch129: 421-gcc-atmega48hvf.patch
47 Patch130: 422-gcc-atmega26hvg.patch
48 Patch131: 423-gcc-atmxt224_224e.patch
49 Patch132: 424-gcc-atxmega192c3.patch
50 Patch133: 425-gcc-atmxt112sl.patch
51 Patch134: 426-gcc-atxmega64c3.patch
52 Patch135: 427-gcc-ata6285_6286.patch
53 Patch136: 428-gcc-attiny828.patch
54 Patch137: 429-gcc-ata5790_5790n_5795.patch
55 Patch138: 430-gcc-ata5272_ata5505.patch
56 Patch139: 500-gcc-bug13473.patch
57 Patch140: 501-gcc-avrtiny10-bug-12510.patch
58 Patch141: 502-gcc-bug12915.patch
59 Patch142: 503-gcc-bug13789.patch
60 Patch143: 504-gcc-conditional-register.patch
61 Patch144: 505-gcc-avrtc381-tiny.patch
63 Group: Development/Languages
64 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
65 # Source0-md5: 028115c4fbfb6cfd75d6369f4a90d87e
66 BuildRequires: /bin/bash
67 BuildRequires: autoconf
69 BuildRequires: crossavr-binutils
70 BuildRequires: elfutils-devel >= 0.145-1
72 BuildRequires: gmp-devel >= 4.1
73 BuildRequires: libmpc-devel
74 BuildRequires: mpfr-devel >= 2.3.0
75 BuildRequires: perl-tools-pod
76 BuildRequires: rpmbuild(macros) >= 1.565
77 BuildRequires: sed >= 4.0
78 Requires: crossavr-binutils >= 2.15.91.0.2
79 %{!?with_bootstrap:Requires: crossavr-libc}
81 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84 %define arch %{_prefix}/%{target}
85 %define gccarch %{_libdir}/gcc/%{target}
86 %define gcclib %{_libdir}/gcc/%{target}/%{version}
87 %define _noautostrip .*%{gcclib}.*/libgc.*\\.a
90 This package contains a cross-gcc which allows the creation of
91 binaries to be run on Atmel AVR on other machines.
93 %description -l de.UTF-8
94 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
95 anderem Rechner Code für Atmel AVR zu generieren.
97 %description -l pl.UTF-8
98 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
99 maszynach binariów do uruchamiania na Atmel AVR.
102 Summary: C++ support for avr-gcc
103 Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
104 Group: Development/Languages
105 Requires: %{name} = %{epoch}:%{version}-%{release}
108 This package adds C++ support to the GNU Compiler Collection for AVR.
110 %description c++ -l pl.UTF-8
111 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
114 %setup -q -n gcc-%{version}
115 cd gcc/config/%{target} && %undos -f c,h && cd -
165 install -d obj-%{target}
168 CFLAGS="%{rpmcflags}" \
169 CXXFLAGS="%{rpmcflags}" \
172 --prefix=%{_prefix} \
173 --infodir=%{_infodir} \
174 --mandir=%{_mandir} \
175 --bindir=%{_bindir} \
176 --libdir=%{_libdir} \
177 --libexecdir=%{_libdir} \
179 --enable-languages="c,c++" \
190 --build=%{_target_platform} \
191 --host=%{_target_platform} \
194 %{__make} CFLAGS_FOR_TARGET="-Os"
197 rm -rf $RPM_BUILD_ROOT
199 %{__make} -C obj-%{target} install \
200 DESTDIR=$RPM_BUILD_ROOT
202 # move fixed includes to proper place
203 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
206 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
207 rm -rf $RPM_BUILD_ROOT%{_infodir}
208 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
209 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
210 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
211 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
212 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
213 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
214 rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
217 # strip target libraries
218 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
222 rm -rf $RPM_BUILD_ROOT
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/%{target}-gcc*
227 %attr(755,root,root) %{_bindir}/%{target}-cpp
228 %attr(755,root,root) %{_bindir}/%{target}-gcov
231 %attr(755,root,root) %{gcclib}/cc1
232 %attr(755,root,root) %{gcclib}/collect2
233 %attr(755,root,root) %{gcclib}/lto-wrapper
234 %attr(755,root,root) %{gcclib}/lto1
235 %attr(755,root,root) %{gcclib}/liblto_plugin.so*
239 %dir %{gcclib}/include
240 %{gcclib}/include/*.h
241 %{_mandir}/man1/%{target}-cpp.1*
242 %{_mandir}/man1/%{target}-gcc.1*
243 %{_mandir}/man1/%{target}-gcov.1*
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_bindir}/%{target}-g++
248 %attr(755,root,root) %{_bindir}/%{target}-c++
249 %attr(755,root,root) %{gcclib}/cc1plus
250 %{_mandir}/man1/%{target}-g++.1*