]>
Commit | Line | Data |
---|---|---|
913b8880 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # for bootstraping | |
4 | # | |
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 | |
11 | Name: crossavr32-gcc | |
12 | Version: 4.2.1 | |
13 | Release: 0.6%{?with_bootstrap:.bootstrap} | |
14 | Epoch: 1 | |
3ac1c30c | 15 | License: GPL v2+ |
913b8880 | 16 | Group: Development/Languages |
17 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 | |
18 | # Source0-md5: cba410e6ff70f7d7f4be7a0267707fd0 | |
19 | Patch0: %{name}.patch | |
20 | Patch1: %{name}-configure.patch | |
3ac1c30c | 21 | URL: http://gcc.gnu.org/ |
913b8880 | 22 | BuildRequires: /bin/bash |
23 | BuildRequires: autoconf | |
24 | BuildRequires: bison | |
25 | BuildRequires: crossavr32-binutils | |
26 | BuildRequires: flex | |
27 | Requires: crossavr32-binutils >= 2.17 | |
28 | %{!?with_boostrap:Requires: crossavr32-uClibc} | |
29 | Requires: gcc-dirs | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
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/.* | |
38 | ||
39 | %description | |
40 | This package contains a cross-gcc which allows the creation of | |
41 | binaries to be run on Atmel AVR32 on other machines. | |
42 | ||
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. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych | |
3ac1c30c | 49 | maszynach binariów do uruchamiania na platformie Atmel AVR. |
913b8880 | 50 | |
51 | %package c++ | |
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} | |
56 | ||
57 | %description c++ | |
58 | This package adds C++ support to the GNU Compiler Collection for | |
3ac1c30c | 59 | Atmel AVR32. |
913b8880 | 60 | |
61 | %description c++ -l pl.UTF-8 | |
3ac1c30c JB |
62 | Ten pakiet dodaje obsługę C++ do kompilatora gcc dla platformy Atmel |
63 | AVR32. | |
913b8880 | 64 | |
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 | |
69 | Group: Libraries | |
70 | ||
71 | %description -n crossavr32-libgomp | |
72 | GNU OpenMP library. | |
73 | ||
74 | %description -n crossavr32-libgomp -l pl.UTF-8 | |
75 | Biblioteka GNU OpenMP. | |
76 | ||
77 | %package -n crossavr32-libstdc++ | |
3ac1c30c | 78 | Summary: GNU C++ libraries |
913b8880 | 79 | Summary(pl.UTF-8): Biblioteki GNU C++ |
80 | License: GPL v2+ with free software exception | |
81 | Group: Libraries | |
82 | ||
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. | |
87 | ||
3ac1c30c JB |
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++. | |
92 | ||
913b8880 | 93 | %prep |
94 | %setup -q -n gcc-%{version} | |
95 | %patch0 -p1 | |
96 | %patch1 -p0 | |
97 | ||
98 | %build | |
99 | %{__autoconf} | |
100 | ||
101 | rm -rf obj-%{target} | |
102 | install -d obj-%{target} | |
103 | cd obj-%{target} | |
104 | ||
105 | CFLAGS="%{rpmcflags}" \ | |
106 | CXXFLAGS="%{rpmcflags}" \ | |
107 | TEXCONFIG=false \ | |
108 | ../configure \ | |
109 | --prefix=%{_prefix} \ | |
110 | --infodir=%{_infodir} \ | |
111 | --mandir=%{_mandir} \ | |
112 | --bindir=%{_bindir} \ | |
113 | --libdir=%{_libdir} \ | |
114 | --libexecdir=%{_libdir} \ | |
115 | --enable-shared \ | |
116 | %if %{with bootstrap} | |
117 | --enable-languages="c" \ | |
118 | --disable-libssp \ | |
119 | --disable-threads \ | |
120 | --disable-libmudflap \ | |
121 | --disable-nls \ | |
122 | --disable-libgomp \ | |
123 | %else | |
124 | --enable-languages="c,c++" \ | |
125 | --enable-threads=posix \ | |
126 | --enable-libssp \ | |
127 | --disable-libstdcxx-pch \ | |
128 | --enable-__cxa_atexit \ | |
129 | --enable-libstdcxx-allocator=new \ | |
130 | %endif | |
131 | --with-dwarf2 \ | |
132 | --with-gnu-as \ | |
133 | --with-gnu-ld \ | |
134 | --with-system-zlib \ | |
135 | --with-multilib \ | |
136 | --without-x \ | |
137 | --build=%{_target_platform} \ | |
138 | --host=%{_target_platform} \ | |
139 | --target=%{target} | |
140 | ||
141 | ||
142 | CXXFLAGS_FOR_TARGET="-Os" | |
143 | export CXXFLAGS_FOR_TARGET | |
3ac1c30c JB |
144 | %{__make} \ |
145 | CFLAGS_FOR_TARGET="-Os" \ | |
146 | CXXFLAGS_FOR_TARGET="-Os" | |
913b8880 | 147 | |
148 | %install | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %{__make} -C obj-%{target} install \ | |
152 | DESTDIR=$RPM_BUILD_ROOT | |
153 | ||
154 | # don't want it here | |
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 | |
164 | ||
165 | %if 0%{!?debug:1} | |
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.*.* | |
172 | %endif | |
173 | ||
174 | %clean | |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | ||
177 | %files | |
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 | |
182 | %dir %{gccarch} | |
183 | %dir %{gcclib} | |
184 | %attr(755,root,root) %{gcclib}/cc1 | |
185 | %attr(755,root,root) %{gcclib}/collect2 | |
186 | %{gcclib}/libg*.a | |
187 | %{gcclib}/crt*.o | |
188 | %{gcclib}/uc | |
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* | |
194 | ||
195 | %if %{without bootstrap} | |
196 | %files c++ | |
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* | |
202 | ||
203 | %files -n crossavr32-libgomp | |
204 | %defattr(644,root,root,755) | |
205 | %{arch}/lib/libgomp* | |
206 | %{arch}/lib/uc/libgomp* | |
207 | ||
208 | %files -n crossavr32-libstdc++ | |
209 | %defattr(644,root,root,755) | |
210 | %{arch}/lib/libstdc* | |
211 | %{arch}/lib/libsupc* | |
212 | %{arch}/lib/uc/libstdc* | |
213 | %{arch}/lib/uc/libsupc* | |
214 | %{arch}/include/c++ | |
913b8880 | 215 | %endif |