1 # $RevOCision: 1.31 $, $Date: 2007-08-01 20:42:29 $
4 %bcond_with bootstrap # for bootstraping
6 Summary: Cross AVR32 GNU binary utility development utilities - gcc
7 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR32 gcc
8 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR32 gcc
9 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR32 - gcc
10 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR32 gcc
11 Summary(tr.UTF-8): GNU geliştirme araçları - AVR32 gcc
14 Release: 0.6%{?with_bootstrap:.bootstrap}
17 Group: Development/Languages
18 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
19 # Source0-md5: cba410e6ff70f7d7f4be7a0267707fd0
21 Patch1: %{name}-configure.patch
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 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 AVR32.
64 %package -n crossavr32-libgomp
65 Summary: GNU OpenMP library
66 Summary(pl.UTF-8): Biblioteka GNU OpenMP
67 License: GPL v2+ with unlimited link permission
70 %description -n crossavr32-libgomp
73 %description -n crossavr32-libgomp -l pl.UTF-8
74 Biblioteka GNU OpenMP.
76 %package -n crossavr32-libstdc++
77 Summary: GNU C++ library
78 Summary(pl.UTF-8): Biblioteki GNU C++
79 License: GPL v2+ with free software exception
82 %description -n crossavr32-libstdc++
83 This is the GNU implementation of the standard C++ libraries, along
84 with additional GNU tools. This package includes the shared libraries
85 necessary to run C++ applications.
88 %setup -q -n gcc-%{version}
96 install -d obj-%{target}
99 CFLAGS="%{rpmcflags}" \
100 CXXFLAGS="%{rpmcflags}" \
103 --prefix=%{_prefix} \
104 --infodir=%{_infodir} \
105 --mandir=%{_mandir} \
106 --bindir=%{_bindir} \
107 --libdir=%{_libdir} \
108 --libexecdir=%{_libdir} \
110 %if %{with bootstrap}
111 --enable-languages="c" \
114 --disable-libmudflap \
118 --enable-languages="c,c++" \
119 --enable-threads=posix \
121 --disable-libstdcxx-pch \
122 --enable-__cxa_atexit \
123 --enable-libstdcxx-allocator=new \
131 --build=%{_target_platform} \
132 --host=%{_target_platform} \
136 CXXFLAGS_FOR_TARGET="-Os"
137 export CXXFLAGS_FOR_TARGET
138 %{__make} CFLAGS_FOR_TARGET="-Os" CXXFLAGS_FOR_TARGET="-Os"
141 rm -rf $RPM_BUILD_ROOT
143 %{__make} -C obj-%{target} install \
144 DESTDIR=$RPM_BUILD_ROOT
147 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
148 rm -rf $RPM_BUILD_ROOT%{_infodir}
149 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
150 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
151 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
152 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
153 rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
154 rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
155 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
158 # strip target libraries
159 %{target}-strip --strip-debug --remove-section=.note --remove-section=.comment \
160 $RPM_BUILD_ROOT%{gcclib}{,/uc}/libg*.a \
161 $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.a
162 %{target}-strip --strip-unneeded --remove-section=.note --remove-section=.comment \
163 $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.so.*.*
167 rm -rf $RPM_BUILD_ROOT
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/%{target}-gcc*
172 %attr(755,root,root) %{_bindir}/%{target}-cpp
173 %attr(755,root,root) %{_bindir}/%{target}-gcov
176 %attr(755,root,root) %{gcclib}/cc1
177 %attr(755,root,root) %{gcclib}/collect2
181 %dir %{gcclib}/include
182 %{gcclib}/include/*.h
183 %{_mandir}/man1/%{target}-cpp.1*
184 %{_mandir}/man1/%{target}-gcc.1*
185 %{_mandir}/man1/%{target}-gcov.1*
187 %if %{without bootstrap}
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/%{target}-g++
191 %attr(755,root,root) %{_bindir}/%{target}-c++
192 %attr(755,root,root) %{gcclib}/cc1plus
193 %{_mandir}/man1/%{target}-g++.1*
195 %files -n crossavr32-libgomp
196 %defattr(644,root,root,755)
198 %{arch}/lib/uc/libgomp*
200 %files -n crossavr32-libstdc++
201 %defattr(644,root,root,755)
204 %{arch}/lib/uc/libstdc*
205 %{arch}/lib/uc/libsupc*