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
14 Patch0: crossavr-gcc-bug-11259-v3.patch
15 Patch1: crossavr-gcc-bug-18145.patch
16 Patch2: crossavr-gcc-bug-19636-24894-31644-31786.patch
17 Patch3: crossavr-gcc-bug-33009.patch
18 Patch4: crossavr-gcc-bug-34210-35508.patch
19 Patch5: crossavr-gcc-bug-35013.patch
20 Patch6: crossavr-gcc-builtins-v6.patch
21 Patch7: crossavr-gcc-libgcc.patch
22 Patch8: crossavr-gcc-libiberty-Makefile.in.patch
23 Patch9: crossavr-gcc-new-devices.patch
24 Patch10: crossavr-gcc-param-inline-call-cost.patch
25 Patch11: crossavr-gcc-xmega.patch
26 Patch12: crossavr-gcc-osmain.patch
29 Group: Development/Languages
30 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
31 # Source0-md5: e588cfde3bf323f82918589b94f14a15
32 BuildRequires: /bin/bash
33 BuildRequires: autoconf
35 BuildRequires: crossavr-binutils
37 BuildRequires: gmp-devel >= 4.1
38 BuildRequires: mpfr-devel >= 2.3.0
39 BuildRequires: perl-tools-pod
40 Requires: crossavr-binutils >= 2.15.91.0.2
41 %{!?with_bootstrap:Requires: crossavr-libc}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define arch %{_prefix}/%{target}
47 %define gccarch %{_libdir}/gcc/%{target}
48 %define gcclib %{_libdir}/gcc/%{target}/%{version}
49 %define _noautostrip .*%{gcclib}.*/libgc.*\\.a
52 This package contains a cross-gcc which allows the creation of
53 binaries to be run on Atmel AVR on other machines.
55 %description -l de.UTF-8
56 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
57 anderem Rechner Code für Atmel AVR zu generieren.
59 %description -l pl.UTF-8
60 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
61 maszynach binariów do uruchamiania na Atmel AVR.
64 Summary: C++ support for avr-gcc
65 Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
66 Group: Development/Languages
67 Requires: %{name} = %{epoch}:%{version}-%{release}
70 This package adds C++ support to the GNU Compiler Collection for AVR.
72 %description c++ -l pl.UTF-8
73 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
76 %setup -q -n gcc-%{version}
93 install -d obj-%{target}
96 CFLAGS="%{rpmcflags}" \
97 CXXFLAGS="%{rpmcflags}" \
100 --prefix=%{_prefix} \
101 --infodir=%{_infodir} \
102 --mandir=%{_mandir} \
103 --bindir=%{_bindir} \
104 --libdir=%{_libdir} \
105 --libexecdir=%{_libdir} \
108 --enable-languages="c,c++" \
115 --build=%{_target_platform} \
116 --host=%{_target_platform} \
119 %{__make} CFLAGS_FOR_TARGET="-Os"
122 rm -rf $RPM_BUILD_ROOT
124 %{__make} -C obj-%{target} install \
125 DESTDIR=$RPM_BUILD_ROOT
127 # move fixed includes to proper place
128 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
131 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
132 rm -rf $RPM_BUILD_ROOT%{_infodir}
133 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
134 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
135 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
136 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
137 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
138 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
141 # strip target libraries
142 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
146 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_bindir}/%{target}-gcc*
151 %attr(755,root,root) %{_bindir}/%{target}-cpp
152 %attr(755,root,root) %{_bindir}/%{target}-gcov
155 %attr(755,root,root) %{gcclib}/cc1
156 %attr(755,root,root) %{gcclib}/collect2
159 %dir %{gcclib}/include
160 %{gcclib}/include/*.h
161 %{_mandir}/man1/%{target}-cpp.1*
162 %{_mandir}/man1/%{target}-gcc.1*
163 %{_mandir}/man1/%{target}-gcov.1*
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_bindir}/%{target}-g++
168 %attr(755,root,root) %{_bindir}/%{target}-c++
169 %attr(755,root,root) %{gcclib}/cc1plus
170 %{_mandir}/man1/%{target}-g++.1*