]>
Commit | Line | Data |
---|---|---|
b5cedbcf ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # bootstrap build (using binary w32api/mingw) | |
4 | # | |
087e27d4 JB |
5 | Summary: Cross Mingw32CE GNU binary utility development utilities - gcc |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw32CE gcc | |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw32CE gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw32CE - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw32CE gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - Mingw32CE gcc | |
b5cedbcf | 11 | Name: crossmingw32ce-gcc |
baa4c5f5 | 12 | Version: 4.1.0 |
b5cedbcf ER |
13 | Release: 0.1 |
14 | License: GPL | |
15 | Group: Development/Languages | |
baa4c5f5 ER |
16 | #Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
17 | # https://cegcc.svn.sourceforge.net/svnroot/cegcc/trunk/cegcc/src/gcc | |
baa4c5f5 ER |
18 | Source0: gcc-20070227.909.tar.bz2 |
19 | # Source0-md5: ece53d2ea4d055f48d4f819922332d21 | |
b5cedbcf | 20 | Patch0: gcc-nodebug.patch |
63950d4d | 21 | Patch1: %{name}-bug25672.patch |
b5cedbcf ER |
22 | BuildRequires: autoconf |
23 | BuildRequires: automake | |
24 | BuildRequires: bison | |
25 | BuildRequires: crossmingw32ce-binutils >= 2.15.91.0.2-2 | |
26 | BuildRequires: flex | |
baa4c5f5 | 27 | BuildRequires: rpmbuild(macros) >= 1.315 |
253a3553 ER |
28 | %if %{with bootstrap} |
29 | # download rpm from http://cegcc.sourceforge.net/ | |
30 | BuildRequires: cegcc | |
31 | %else | |
b5cedbcf ER |
32 | BuildRequires: crossmingw32ce-runtime >= 3.5 |
33 | BuildRequires: crossmingw32ce-w32api >= 3.1 | |
34 | %endif | |
253a3553 | 35 | Requires: crossmingw32ce-binutils >= 2.15.91.0.2-2 |
b5cedbcf ER |
36 | Requires: gcc-dirs |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
baa4c5f5 ER |
39 | %define target arm-wince-mingw32ce |
40 | %define target_platform arm-wince-mingw32ce | |
b5cedbcf ER |
41 | %define arch %{_prefix}/%{target} |
42 | %define gccarch %{_libdir}/gcc/%{target} | |
43 | %define gcclib %{gccarch}/%{version} | |
44 | ||
baa4c5f5 ER |
45 | %define _noautostrip .*/lib.*\\.a |
46 | ||
47 | # -march=i686 is invalid | |
48 | # so as i can't decide whether to use -march=armv4 or -march=armv5, i'll just strip | |
49 | %define filterout_c -march=.* | |
50 | %define filterout_cxx -march=.* | |
b5cedbcf ER |
51 | |
52 | %description | |
087e27d4 | 53 | crossmingw32ce is a complete cross-compiling development system for |
b5cedbcf | 54 | building stand-alone Microsoft Windows applications under Linux using |
087e27d4 JB |
55 | the Mingw32CE build libraries. This includes a binutils, gcc with g++ |
56 | and objc, and libstdc++, all cross targeted to i386-mingw32ce, along | |
b5cedbcf ER |
57 | with supporting Win32 libraries in 'coff' format from free sources. |
58 | ||
59 | This package contains cross targeted gcc. | |
60 | ||
baa4c5f5 ER |
61 | %description -l de.UTF-8 |
62 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
63 | anderem Rechner Code für Win32 zu generieren. | |
b5cedbcf | 64 | |
baa4c5f5 | 65 | %description -l pl.UTF-8 |
087e27d4 | 66 | crossmingw32ce jest kompletnym systemem do kompilacji skrośnej, |
baa4c5f5 | 67 | pozwalającym budować aplikacje MS Windows pod Linuksem używając |
087e27d4 JB |
68 | bibliotek Mingw32CE. System składa się z binutils, gcc z g++ i objc, |
69 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32ce, | |
70 | oraz z bibliotek w formacie COFF. | |
b5cedbcf | 71 | |
baa4c5f5 | 72 | Ten pakiet zawiera gcc generujące skrośnie kod dla Win32. |
b5cedbcf ER |
73 | |
74 | %package c++ | |
087e27d4 JB |
75 | Summary: Mingw32CE binary utility development utilities - g++ |
76 | Summary(pl.UTF-8): Zestaw narzędzi mingw32ce - g++ | |
b5cedbcf ER |
77 | Group: Development/Languages |
78 | Requires: %{name} = %{version}-%{release} | |
79 | ||
80 | %description c++ | |
087e27d4 | 81 | crossmingw32ce is a complete cross-compiling development system for |
b5cedbcf | 82 | building stand-alone Microsoft Windows applications under Linux using |
087e27d4 JB |
83 | the Mingw32CE build libraries. This includes a binutils, gcc with g++ |
84 | and objc, and libstdc++, all cross targeted to i386-mingw32ce, along | |
b5cedbcf ER |
85 | with supporting Win32 libraries in 'coff' format from free sources. |
86 | ||
87 | This package contains cross targeted g++ and (static) libstdc++. | |
88 | ||
baa4c5f5 | 89 | %description c++ -l pl.UTF-8 |
087e27d4 | 90 | crossmingw32ce jest kompletnym systemem do kompilacji skrośnej, |
baa4c5f5 | 91 | pozwalającym budować aplikacje MS Windows pod Linuksem używając |
087e27d4 JB |
92 | bibliotek mingw32ce. System składa się z binutils, gcc z g++ i objc, |
93 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32ce, | |
94 | oraz z bibliotek w formacie COFF. | |
b5cedbcf | 95 | |
baa4c5f5 | 96 | Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę |
b5cedbcf ER |
97 | libstdc++. |
98 | ||
b5cedbcf | 99 | %prep |
baa4c5f5 | 100 | %setup -q -n gcc |
b5cedbcf | 101 | %if %{with bootstrap} |
253a3553 ER |
102 | install -d winsup/w32api |
103 | ln -s /usr/ppc/%{target}/include/w32api winsup/w32api/include | |
b5cedbcf ER |
104 | %endif |
105 | #{!?debug:%patch0 -p1} | |
63950d4d | 106 | %patch1 -p0 |
b5cedbcf ER |
107 | |
108 | %build | |
109 | %if %{with bootstrap} | |
253a3553 ER |
110 | #for tool in as ar dlltool ld nm ranlib strip; do |
111 | # ln -sf %{arch}/bin/$tool winsup/bin/$tool | |
112 | #done | |
b5cedbcf | 113 | build_tooldir=`pwd`/winsup |
63950d4d | 114 | includedir=/usr/ppc/%{target}/include |
b5cedbcf ER |
115 | %else |
116 | build_tooldir=%{arch} | |
63950d4d | 117 | includedir=/usr/%{target}/include |
b5cedbcf ER |
118 | %endif |
119 | ||
120 | cp /usr/share/automake/config.sub . | |
121 | cp /usr/share/automake/config.sub boehm-gc | |
122 | ||
123 | rm -rf obj-%{target_platform} | |
124 | install -d obj-%{target_platform} | |
125 | cd obj-%{target_platform} | |
126 | ||
127 | # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++ | |
128 | CFLAGS="%{rpmcflags}" \ | |
129 | %ifarch alpha | |
130 | CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \ | |
131 | %else | |
132 | %ifarch sparc sparc64 sparcv9 | |
133 | CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \ | |
134 | %else | |
135 | CXXFLAGS="%{rpmcflags}" \ | |
136 | %endif | |
137 | %endif | |
138 | LDFLAGS="%{rpmldflags}" \ | |
139 | TEXCONFIG=false \ | |
140 | ../configure \ | |
141 | --prefix=%{_prefix} \ | |
142 | --infodir=%{_infodir} \ | |
143 | --mandir=%{_mandir} \ | |
144 | --bindir=%{arch}/bin \ | |
145 | --libdir=%{_libdir} \ | |
146 | --libexecdir=%{_libexecdir} \ | |
63950d4d | 147 | --includedir=$includedir \ |
b5cedbcf ER |
148 | --disable-shared \ |
149 | --enable-threads \ | |
baa4c5f5 | 150 | --enable-languages="c,c++" \ |
b5cedbcf ER |
151 | --enable-c99 \ |
152 | --enable-long-long \ | |
153 | --disable-nls \ | |
154 | --with-gnu-as \ | |
155 | --with-gnu-ld \ | |
156 | --with-mangler-in-ld \ | |
157 | --with-gxx-include-dir=%{arch}/include/g++ \ | |
158 | --build=%{_target_platform} \ | |
159 | --host=%{_target_platform} \ | |
160 | --target=%{target} | |
161 | ||
162 | %{__make} all | |
163 | ||
164 | # spec files for msvcrt*.dll configurations | |
165 | cd gcc | |
166 | for n in msvcrt msvcrt20 msvcrt40; do | |
167 | sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n | |
168 | done | |
169 | ||
170 | %install | |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}} | |
173 | ||
174 | cd obj-%{target_platform} | |
175 | ||
176 | %{__make} install \ | |
177 | DESTDIR=$RPM_BUILD_ROOT | |
178 | ||
179 | cd gcc | |
180 | install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib} | |
181 | cd ../.. | |
182 | ||
183 | mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir} | |
184 | ||
185 | # already in arch/lib, shouldn't be here | |
186 | rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
187 | ||
188 | # include/ contains install-tools/include/* and headers that were fixed up | |
189 | # by fixincludes, we don't want former | |
190 | gccdir=$RPM_BUILD_ROOT%{gcclib} | |
191 | mkdir $gccdir/tmp | |
192 | # we have to save these however | |
193 | mv -f $gccdir/include/syslimits.h $gccdir/tmp | |
194 | rm -rf $gccdir/include | |
195 | mv -f $gccdir/tmp $gccdir/include | |
196 | cp -f $gccdir/install-tools/include/*.h $gccdir/include | |
197 | # but we don't want anything more from install-tools | |
198 | rm -rf $gccdir/install-tools | |
199 | ||
200 | %if 0%{!?debug:1} | |
201 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a | |
202 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a | |
203 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a | |
204 | %endif | |
205 | ||
206 | # restore hardlinks | |
207 | ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++} | |
208 | ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++} | |
209 | ||
210 | # the same... make hardlink | |
211 | ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc | |
212 | ||
213 | %clean | |
214 | rm -rf $RPM_BUILD_ROOT | |
215 | ||
216 | %files | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_bindir}/%{target}-gcc* | |
219 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
220 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
221 | %attr(755,root,root) %{arch}/bin/gcc | |
222 | %{arch}/lib/libiberty.a | |
223 | ||
224 | %dir %{gccarch} | |
225 | %dir %{gcclib} | |
226 | %attr(755,root,root) %{gcclib}/cc1 | |
227 | %attr(755,root,root) %{gcclib}/collect2 | |
228 | %{gcclib}/libgcc.a | |
229 | %{gcclib}/libgcov.a | |
230 | %{gcclib}/specs* | |
231 | %{gcclib}/include | |
232 | ||
233 | %{_mandir}/man1/%{target}-cpp.1* | |
234 | %{_mandir}/man1/%{target}-gcc.1* | |
235 | %{_mandir}/man1/%{target}-gcov.1* | |
236 | ||
237 | %{arch}/lib/libssp.a | |
238 | %{arch}/lib/libssp.la | |
239 | %{arch}/lib/libssp_nonshared.a | |
240 | %{arch}/lib/libssp_nonshared.la | |
241 | ||
242 | %files c++ | |
243 | %defattr(644,root,root,755) | |
244 | %attr(755,root,root) %{_bindir}/%{target}-[cg]++ | |
245 | %attr(755,root,root) %{arch}/bin/[cg]++ | |
246 | %attr(755,root,root) %{gcclib}/cc1plus | |
247 | %{arch}/lib/libstdc++.a | |
248 | %{arch}/lib/libstdc++.la | |
249 | %{arch}/lib/libsupc++.a | |
250 | %{arch}/lib/libsupc++.la | |
251 | %{arch}/include/g++ | |
252 | %{_mandir}/man1/%{target}-g++.1* |