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 Patch0: gnu_inline-mismatch.patch
16 # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.2
17 # http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-patches.tar.gz
18 Patch100: 300-gcc-xmega-support.patch
19 Patch101: 301-gcc-tiny-support.patch
20 Patch102: 302-gcc-mlist-devices.patch
21 Patch103: 303-ata6289-architecture-correction.patch
22 Patch104: 400-gcc-public-devices-support.patch
23 Patch105: 401-gcc-non-public-devices-support.patch
24 Patch106: 402-gcc-atmega64_128_2564RFR2.patch
25 Patch107: 403-gcc-atmxts200.patch
26 Patch108: 501-gcc-avrtc579.patch
27 Patch109: 502-gcc-pr54796.patch
28 Patch110: 503-gcc-avrtc-513.patch
29 Patch111: 504-gcc-avrtc-610.patch
30 Patch112: 505-gcc-avrtc586.patch
32 Group: Development/Languages
33 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
34 # Source0-md5: 86f428a30379bdee0224e353ee2f999e
35 BuildRequires: /bin/bash
36 BuildRequires: autoconf
38 BuildRequires: crossavr-binutils >= 2.23.1
39 BuildRequires: elfutils-devel >= 0.145-1
41 BuildRequires: gmp-devel >= 4.1
42 BuildRequires: libmpc-devel
43 BuildRequires: mpfr-devel >= 2.3.0
44 BuildRequires: perl-tools-pod
45 BuildRequires: ppl-devel
46 BuildRequires: rpmbuild(macros) >= 1.565
47 BuildRequires: sed >= 4.0
48 Requires: crossavr-binutils >= 2.23.1
49 %{!?with_bootstrap:Requires: crossavr-libc}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define arch %{_prefix}/%{target}
55 %define gccarch %{_libdir}/gcc/%{target}
56 %define gcclib %{_libdir}/gcc/%{target}/%{version}
57 %define _noautostrip .*%{gcclib}.*/libgc.*\\.a
59 # functions with printf format attribute but with special parser and also
60 # receiving non constant format strings
61 %define Werror_cflags %{nil}
64 This package contains a cross-gcc which allows the creation of
65 binaries to be run on Atmel AVR on other machines.
67 %description -l de.UTF-8
68 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
69 anderem Rechner Code für Atmel AVR zu generieren.
71 %description -l pl.UTF-8
72 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
73 maszynach binariów do uruchamiania na Atmel AVR.
76 Summary: C++ support for avr-gcc
77 Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
78 Group: Development/Languages
79 Requires: %{name} = %{epoch}:%{version}-%{release}
82 This package adds C++ support to the GNU Compiler Collection for AVR.
84 %description c++ -l pl.UTF-8
85 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
88 %setup -q -n gcc-%{version}
89 cd gcc/config/%{target} && %undos -f c,h && cd -
107 install -d obj-%{target}
110 CFLAGS="%{rpmcflags}" \
111 CXXFLAGS="%{rpmcflags}" \
114 --prefix=%{_prefix} \
115 --infodir=%{_infodir} \
116 --mandir=%{_mandir} \
117 --bindir=%{_bindir} \
118 --libdir=%{_libdir} \
119 --libexecdir=%{_libdir} \
121 --enable-languages="c,c++" \
132 --disable-ppl-version-check \
134 --build=%{_target_platform} \
135 --host=%{_target_platform} \
138 %{__make} CFLAGS_FOR_TARGET="-Os"
141 rm -rf $RPM_BUILD_ROOT
143 %{__make} -C obj-%{target} install \
144 DESTDIR=$RPM_BUILD_ROOT
146 # move fixed includes to proper place
147 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
150 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
151 rm -rf $RPM_BUILD_ROOT%{_infodir}
152 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
153 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
154 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
155 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
156 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
157 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
158 rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
161 # strip target libraries
162 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
166 rm -rf $RPM_BUILD_ROOT
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/%{target}-gcc*
171 %attr(755,root,root) %{_bindir}/%{target}-cpp
172 %attr(755,root,root) %{_bindir}/%{target}-gcov
175 %attr(755,root,root) %{gcclib}/cc1
176 %attr(755,root,root) %{gcclib}/collect2
177 %attr(755,root,root) %{gcclib}/lto-wrapper
178 %attr(755,root,root) %{gcclib}/lto1
179 %attr(755,root,root) %{gcclib}/liblto_plugin.so*
183 %dir %{gcclib}/tiny-stack
184 %{gcclib}/tiny-stack/*.a
185 %dir %{gcclib}/include
186 %{gcclib}/include/*.h
187 %{_mandir}/man1/%{target}-cpp.1*
188 %{_mandir}/man1/%{target}-gcc.1*
189 %{_mandir}/man1/%{target}-gcov.1*
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_bindir}/%{target}-g++
194 %attr(755,root,root) %{_bindir}/%{target}-c++
195 %attr(755,root,root) %{gcclib}/cc1plus
196 %{_mandir}/man1/%{target}-g++.1*