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: %{name}-0b-constants.patch
15 Patch1: %{name}-attribute_alias.patch
16 Patch2: %{name}-bug25672.patch
17 Patch3: %{name}-dwarf.patch
18 Patch4: %{name}-libiberty-Makefile.in.patch
19 Patch5: %{name}-zz-atmega256x.patch
22 Group: Development/Languages
23 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
24 # Source0-md5: d79f553e7916ea21c556329eacfeaa16
25 BuildRequires: /bin/bash
26 BuildRequires: autoconf
28 BuildRequires: crossavr-binutils
30 Requires: crossavr-binutils >= 2.15.91.0.2
31 %{!?with_boostrap:Requires: crossavr-libc}
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define arch %{_prefix}/%{target}
37 %define gccarch %{_libdir}/gcc/%{target}
38 %define gcclib %{_libdir}/gcc/%{target}/%{version}
39 %define _noautostrip .*%{gcclib}.*/libgc.*\\.a
42 This package contains a cross-gcc which allows the creation of
43 binaries to be run on Atmel AVR on other machines.
45 %description -l de.UTF-8
46 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
47 anderem Rechner Code für Atmel AVR zu generieren.
49 %description -l pl.UTF-8
50 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
51 maszynach binariów do uruchamiania na Atmel AVR.
54 Summary: C++ support for avr-gcc
55 Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
56 Group: Development/Languages
57 Requires: %{name} = %{epoch}:%{version}-%{release}
60 This package adds C++ support to the GNU Compiler Collection for AVR.
62 %description c++ -l pl.UTF-8
63 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
66 %setup -q -n gcc-%{version}
76 install -d obj-%{target}
79 CFLAGS="%{rpmcflags}" \
80 CXXFLAGS="%{rpmcflags}" \
84 --infodir=%{_infodir} \
88 --libexecdir=%{_libdir} \
91 --enable-languages="c,c++" \
98 --build=%{_target_platform} \
99 --host=%{_target_platform} \
102 %{__make} CFLAGS_FOR_TARGET="-Os"
105 rm -rf $RPM_BUILD_ROOT
107 %{__make} -C obj-%{target} install \
108 DESTDIR=$RPM_BUILD_ROOT
111 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
112 rm -rf $RPM_BUILD_ROOT%{_infodir}
113 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
114 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
115 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
116 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
117 rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
118 rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
119 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
122 # strip target libraries
123 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
127 rm -rf $RPM_BUILD_ROOT
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_bindir}/%{target}-gcc*
132 %attr(755,root,root) %{_bindir}/%{target}-cpp
133 %attr(755,root,root) %{_bindir}/%{target}-gcov
136 %attr(755,root,root) %{gcclib}/cc1
137 %attr(755,root,root) %{gcclib}/collect2
140 %dir %{gcclib}/include
141 %{gcclib}/include/*.h
142 %{_mandir}/man1/%{target}-cpp.1*
143 %{_mandir}/man1/%{target}-gcc.1*
144 %{_mandir}/man1/%{target}-gcov.1*
147 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_bindir}/%{target}-g++
149 %attr(755,root,root) %{_bindir}/%{target}-c++
150 %attr(755,root,root) %{gcclib}/cc1plus
151 %{_mandir}/man1/%{target}-g++.1*