3 %bcond_with bootstrap # for bootstraping
5 Summary: Cross AVR32 GNU binary utility development utilities - gcc
6 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR32 gcc
7 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR32 gcc
8 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR32 - gcc
9 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR32 gcc
10 Summary(tr.UTF-8): GNU geliştirme araçları - AVR32 gcc
13 Release: 0.6%{?with_bootstrap:.bootstrap}
16 Group: Development/Languages
17 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5: cba410e6ff70f7d7f4be7a0267707fd0
20 Patch1: %{name}-configure.patch
21 URL: http://gcc.gnu.org/
22 BuildRequires: /bin/bash
23 BuildRequires: autoconf
25 BuildRequires: crossavr32-binutils
27 Requires: crossavr32-binutils >= 2.17
28 %{!?with_boostrap:Requires: crossavr32-uClibc}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define target avr32-pld-linux
33 %define arch %{_prefix}/%{target}
34 %define gccarch %{_libdir}/gcc/%{target}
35 %define gcclib %{_libdir}/gcc/%{target}/%{version}
36 %define _noautostrip .*%{arch}/lib/.*
37 %define _noautochrpath .*%{arch}/lib/.*
40 This package contains a cross-gcc which allows the creation of
41 binaries to be run on Atmel AVR32 on other machines.
43 %description -l de.UTF-8
44 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
45 anderem Rechner Code für Atmel AVR32 zu generieren.
47 %description -l pl.UTF-8
48 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
49 maszynach binariów do uruchamiania na platformie Atmel AVR.
52 Summary: C++ support for avr32-gcc
53 Summary(pl.UTF-8): Obsługa C++ dla avr32-gcc
54 Group: Development/Languages
55 Requires: %{name} = %{epoch}:%{version}-%{release}
58 This package adds C++ support to the GNU Compiler Collection for
61 %description c++ -l pl.UTF-8
62 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla platformy Atmel
65 %package -n crossavr32-libgomp
66 Summary: GNU OpenMP library
67 Summary(pl.UTF-8): Biblioteka GNU OpenMP
68 License: GPL v2+ with unlimited link permission
71 %description -n crossavr32-libgomp
74 %description -n crossavr32-libgomp -l pl.UTF-8
75 Biblioteka GNU OpenMP.
77 %package -n crossavr32-libstdc++
78 Summary: GNU C++ libraries
79 Summary(pl.UTF-8): Biblioteki GNU C++
80 License: GPL v2+ with free software exception
83 %description -n crossavr32-libstdc++
84 This is the GNU implementation of the standard C++ libraries, along
85 with additional GNU tools. This package includes the shared libraries
86 necessary to run C++ applications.
88 %description -n crossavr32-libstdc++ -l pl.UTF-8
89 Implementacja GNU standardowych bibliotek C++ wraz z dodatkowymi
90 narzędziami do C++. Ten pakiet zawiera biblioteki współdzielone
91 potrzebne do uruchamiania aplikacji w C++.
94 %setup -q -n gcc-%{version}
102 install -d obj-%{target}
105 CFLAGS="%{rpmcflags}" \
106 CXXFLAGS="%{rpmcflags}" \
109 --prefix=%{_prefix} \
110 --infodir=%{_infodir} \
111 --mandir=%{_mandir} \
112 --bindir=%{_bindir} \
113 --libdir=%{_libdir} \
114 --libexecdir=%{_libdir} \
116 %if %{with bootstrap}
117 --enable-languages="c" \
120 --disable-libmudflap \
124 --enable-languages="c,c++" \
125 --enable-threads=posix \
127 --disable-libstdcxx-pch \
128 --enable-__cxa_atexit \
129 --enable-libstdcxx-allocator=new \
137 --build=%{_target_platform} \
138 --host=%{_target_platform} \
142 CXXFLAGS_FOR_TARGET="-Os"
143 export CXXFLAGS_FOR_TARGET
145 CFLAGS_FOR_TARGET="-Os" \
146 CXXFLAGS_FOR_TARGET="-Os"
149 rm -rf $RPM_BUILD_ROOT
151 %{__make} -C obj-%{target} install \
152 DESTDIR=$RPM_BUILD_ROOT
155 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
156 rm -rf $RPM_BUILD_ROOT%{_infodir}
157 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
158 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
159 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
160 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
161 rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
162 rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
163 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
166 # strip target libraries
167 %{target}-strip --strip-debug --remove-section=.note --remove-section=.comment \
168 $RPM_BUILD_ROOT%{gcclib}{,/uc}/libg*.a \
169 $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.a
170 %{target}-strip --strip-unneeded --remove-section=.note --remove-section=.comment \
171 $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.so.*.*
175 rm -rf $RPM_BUILD_ROOT
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/%{target}-gcc*
180 %attr(755,root,root) %{_bindir}/%{target}-cpp
181 %attr(755,root,root) %{_bindir}/%{target}-gcov
184 %attr(755,root,root) %{gcclib}/cc1
185 %attr(755,root,root) %{gcclib}/collect2
189 %dir %{gcclib}/include
190 %{gcclib}/include/*.h
191 %{_mandir}/man1/%{target}-cpp.1*
192 %{_mandir}/man1/%{target}-gcc.1*
193 %{_mandir}/man1/%{target}-gcov.1*
195 %if %{without bootstrap}
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/%{target}-g++
199 %attr(755,root,root) %{_bindir}/%{target}-c++
200 %attr(755,root,root) %{gcclib}/cc1plus
201 %{_mandir}/man1/%{target}-g++.1*
203 %files -n crossavr32-libgomp
204 %defattr(644,root,root,755)
206 %{arch}/lib/uc/libgomp*
208 %files -n crossavr32-libstdc++
209 %defattr(644,root,root,755)
212 %{arch}/lib/uc/libstdc*
213 %{arch}/lib/uc/libsupc*