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