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.1.830
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: 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
78 Group: Development/Languages
79 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
80 # Source0-md5: 028115c4fbfb6cfd75d6369f4a90d87e
81 BuildRequires: /bin/bash
82 BuildRequires: autoconf
84 BuildRequires: crossavr-binutils
85 BuildRequires: elfutils-devel >= 0.145-1
87 BuildRequires: gmp-devel >= 4.1
88 BuildRequires: libmpc-devel
89 BuildRequires: mpfr-devel >= 2.3.0
90 BuildRequires: perl-tools-pod
91 BuildRequires: rpmbuild(macros) >= 1.565
92 BuildRequires: sed >= 4.0
93 Requires: crossavr-binutils >= 2.15.91.0.2
94 %{!?with_bootstrap:Requires: crossavr-libc}
96 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 %define arch %{_prefix}/%{target}
100 %define gccarch %{_libdir}/gcc/%{target}
101 %define gcclib %{_libdir}/gcc/%{target}/%{version}
102 %define _noautostrip .*%{gcclib}.*/libgc.*\\.a
104 # functions with printf format attribute but with special parser and also
105 # receiving non constant format strings
106 %define Werror_cflags %{nil}
109 This package contains a cross-gcc which allows the creation of
110 binaries to be run on Atmel AVR on other machines.
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.
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.
121 Summary: C++ support for avr-gcc
122 Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
123 Group: Development/Languages
124 Requires: %{name} = %{epoch}:%{version}-%{release}
127 This package adds C++ support to the GNU Compiler Collection for AVR.
129 %description c++ -l pl.UTF-8
130 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
133 %setup -q -n gcc-%{version}
134 cd gcc/config/%{target} && %undos -f c,h && cd -
199 install -d obj-%{target}
202 CFLAGS="%{rpmcflags}" \
203 CXXFLAGS="%{rpmcflags}" \
206 --prefix=%{_prefix} \
207 --infodir=%{_infodir} \
208 --mandir=%{_mandir} \
209 --bindir=%{_bindir} \
210 --libdir=%{_libdir} \
211 --libexecdir=%{_libdir} \
213 --enable-languages="c,c++" \
224 --build=%{_target_platform} \
225 --host=%{_target_platform} \
228 %{__make} CFLAGS_FOR_TARGET="-Os"
231 rm -rf $RPM_BUILD_ROOT
233 %{__make} -C obj-%{target} install \
234 DESTDIR=$RPM_BUILD_ROOT
236 # move fixed includes to proper place
237 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
240 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
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
246 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
247 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
248 rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
251 # strip target libraries
252 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
256 rm -rf $RPM_BUILD_ROOT
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/%{target}-gcc*
261 %attr(755,root,root) %{_bindir}/%{target}-cpp
262 %attr(755,root,root) %{_bindir}/%{target}-gcov
265 %attr(755,root,root) %{gcclib}/cc1
266 %attr(755,root,root) %{gcclib}/collect2
267 %attr(755,root,root) %{gcclib}/lto-wrapper
268 %attr(755,root,root) %{gcclib}/lto1
269 %attr(755,root,root) %{gcclib}/liblto_plugin.so*
273 %dir %{gcclib}/include
274 %{gcclib}/include/*.h
275 %{_mandir}/man1/%{target}-cpp.1*
276 %{_mandir}/man1/%{target}-gcc.1*
277 %{_mandir}/man1/%{target}-gcov.1*
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*