]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
6cedcbc592e1cf7db92180a1aa291c4fade5695e
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 Summary:        Mingw32 GNU Binary Utility Development Utilities - gcc
2 Name:           crossmingw32-gcc
3 %define gccversion 2.95.3.test1
4 Version:        2.95.3
5 Release:        1
6 Epoch:          1
7 License:        GPL
8 Group:          Development/Languages
9 Group(de):      Entwicklung/Sprachen
10 Group(pl):      Programowanie/Jêzyki
11 ExclusiveArch:  %{ix86}
12 Source0:        ftp://ftp.gnu.org/pub/gnu/gcc-%{gccversion}.tar.gz
13 Patch0:         gcc-info.patch
14 Patch1:         gcc-pld-linux.patch
15 Patch2:         gcc-libstdc++.patch
16 Patch3:         gcc-bootstrap.patch
17 Patch4:         gcc-cpp-macro-doc.patch
18 Patch5:         gcc-default-arch.patch
19 #Patch6:        gcc-cvs-updates-20000826.patch.gz
20 Patch7:         gcc-libstdc++-out-of-mem.patch
21 Patch8:         gcc-libstdc++-wstring.patch
22 #Patch9:        gcc-libstdc++-wall3.patch
23 Patch10:        gcc-libstdc++-bastring.patch
24 Patch11:        gcc-manpage.patch
25 Patch12:        gcc-cpp-dos-newlines.patch
26 Patch13:        gcc-gpc.patch
27 #Patch14:       gcc-arm-config.patch
28 Patch15:        gcc-m68k-pic.patch
29 Patch16:        gcc-sparc32-rfi.patch
30 Patch17:        gcc-builtin-apply.patch
31 Patch18:        gcc-gcj-backport.patch
32 Patch19:        gcc-ppc-ice.patch
33 Patch20:        gcc-ppc-descriptions.patch
34 #Patch21:       gcc-ppc-andrew-dwarf-eh.patch
35 Patch22:        gcc-alpha-complex-float.patch
36 #Patch23:       gcc-emit-rtl.patch
37 Patch24:        gcc-gcj-vs-iconv.patch
38 Patch25:        gcc-libobjc.patch
39 Patch26:        gcc-pointer-arith.patch
40 #Patch27:       gcc-glibc-2.2.patch
41 #Patch28:       gcc-O2-bug.patch
42 Patch29:        %{name}-libio.patch
43 Patch30:        %{name}-includes.patch
44 Patch31:        %{name}-libiberty.patch
45 BuildRequires:  crossmingw32-platform
46 BuildRequires:  crossmingw32-binutils
47 BuildRequires:  flex
48 BuildRequires:  bison
49 BuildRequires:  autoconf
50 Requires:       crossmingw32-binutils
51 Requires:       crossmingw32-platform
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         target          i386-mingw32
55 %define         target_platform i386-pc-mingw32
56 %define         _prefix         /usr
57 %define         arch            %{_prefix}/%{target}
58 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
59 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
60
61 %description
62 crossmingw32 is a complete cross-compiling development system for
63 building stand-alone Microsoft Windows applications under Linux using
64 the Mingw32 build libraries. This includes a binutils, gcc with g++
65 and objc, and libstdc++, all cross targeted to i386-mingw32, along
66 with supporting Win32 libraries in 'coff' format from free sources.
67
68 This package contains cross targeted gcc.
69
70 %package c++
71 Summary:        Mingw32 GNU Binary Utility Development Utilities - g++
72 Group:          Development/Languages
73 Group(de):      Entwicklung/Sprachen
74 Group(pl):      Programowanie/Jêzyki
75 Requires:       %{name} = %{version}
76
77 %description c++
78 crossmingw32 is a complete cross-compiling development system for
79 building stand-alone Microsoft Windows applications under Linux using
80 the Mingw32 build libraries. This includes a binutils, gcc with g++
81 and objc, and libstdc++, all cross targeted to i386-mingw32, along
82 with supporting Win32 libraries in 'coff' format from free sources.
83
84 This package contains cross targeted g++ and (static) libstdc++.
85
86 # does this even work?
87 %package objc
88 Summary:        Mingw32 GNU Binary Utility Development Utilities - objc
89 Group:          Development/Languages
90 Group(de):      Entwicklung/Sprachen
91 Group(pl):      Programowanie/Jêzyki
92 Requires:       %{name} = %{version}
93
94 %description objc
95 crossmingw32 is a complete cross-compiling development system for
96 building stand-alone Microsoft Windows applications under Linux using
97 the Mingw32 build libraries. This includes a binutils, gcc with g++
98 and objc, and libstdc++, all cross targeted to i386-mingw32, along
99 with supporting Win32 libraries in 'coff' format from free sources.
100
101 This package contains cross targeted objc.
102
103 # does this even work?
104 %package g77
105 Summary:        Mingw32 GNU Binary Utility Development Utilities - g77
106 Group:          Development/Languages
107 Group(de):      Entwicklung/Sprachen
108 Group(pl):      Programowanie/Jêzyki
109 Requires:       %{name} = %{version}
110
111 %description g77
112 crossmingw32 is a complete cross-compiling development system for
113 building stand-alone Microsoft Windows applications under Linux using
114 the Mingw32 build libraries. This includes a binutils, gcc with g++
115 and objc, and libstdc++, all cross targeted to i386-mingw32, along
116 with supporting Win32 libraries in 'coff' format from free sources.
117
118 This package contains cross targeted g77.
119
120 # does this even work?
121 %package chill
122 Summary:        Mingw32 GNU Binary Utility Development Utilities - chill
123 Group:          Development/Languages
124 Group(de):      Entwicklung/Sprachen
125 Group(pl):      Programowanie/Jêzyki
126 Requires:       %{name} = %{version}
127
128 %description chill
129 crossmingw32 is a complete cross-compiling development system for
130 building stand-alone Microsoft Windows applications under Linux using
131 the Mingw32 build libraries. This includes a binutils, gcc with g++
132 and objc, and libstdc++, all cross targeted to i386-mingw32, along
133 with supporting Win32 libraries in 'coff' format from free sources.
134
135 This package contains cross targeted chill.
136
137 # does this even work?
138 %package java
139 Summary:        Mingw32 GNU Binary Utility Development Utilities - java
140 Group:          Development/Languages
141 Group(de):      Entwicklung/Sprachen
142 Group(pl):      Programowanie/Jêzyki
143 Requires:       %{name} = %{version}
144
145 %description java
146 crossmingw32 is a complete cross-compiling development system for
147 building stand-alone Microsoft Windows applications under Linux using
148 the Mingw32 build libraries. This includes a binutils, gcc with g++
149 and objc, and libstdc++, all cross targeted to i386-mingw32, along
150 with supporting Win32 libraries in 'coff' format from free sources.
151
152 This package contains cross targeted java.
153
154 %prep
155 %setup -q -n gcc-%{gccversion}
156 %patch0 -p1
157 %patch1 -p1
158 %patch2 -p1
159 %patch3 -p1
160 %patch4 -p0
161 %patch5 -p0
162 #%patch6 -p1
163 %patch7 -p0
164 %patch8 -p0
165 #%patch9 -p0
166 %patch10 -p0
167 %patch11 -p0
168 %patch12 -p0
169 %patch13 -p1
170 #%ifarch arm
171 #%patch14 -p0
172 #%endif
173 %ifarch m68k
174 %patch15 -p0
175 %endif
176 %ifarch sparc sparc32
177 %patch16 -p0
178 %patch17 -p0
179 %patch18 -p1
180 %endif
181 %ifarch ppc
182 %patch19 -p0
183 %patch20 -p0
184 #%patch21 -p0
185 %endif
186 %ifarch alpha
187 %patch22 -p1
188 %endif
189 #%patch23 -p0
190 %patch24 -p0
191 %patch25 -p0
192 %patch26 -p0
193 #%patch27 -p1
194 #%patch28 -p1
195 %patch29 -p1
196 %patch30 -p1
197 %patch31 -p1
198
199 %build
200 (cd libiberty ; autoconf)
201 (cd gcc
202 autoconf
203 cd ..
204 rm -rf obj-%{target_platform}
205 install -d obj-%{target_platform}
206 cd obj-%{target_platform}
207
208 %{!?debug:CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s"} \
209 %{?debug:CFLAGS="-g -O" CXXFLAGS="-g -O" LDFLAGS=""} \
210 ../configure \
211         --prefix=%{_prefix} \
212         --infodir=%{_infodir} \
213         --mandir=%{_mandir} \
214         --bindir=%{arch}/bin \
215         --with-gnu-as \
216         --with-gnu-ld \
217         --with-gxx-include-dir=%{arch}/include/g++ \
218         --target=%{target}
219
220 # to nie dzia³a bo kto¶ ukrad³ gthr-win32.h i nie wiem co tam wpisaæ
221 #       --enable-threads \
222
223 touch ../gcc/c-gperf.h
224
225 %{__make} \
226         %{!?debug:LDFLAGS_FOR_TARGET="-s"}%{?debug:LDFLAGS_FOR_TARGET=""} \
227         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE"
228
229 # build libobjc.dll for Objective C
230 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
231 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
232 # BTW, ten dll jest do czego¶ potrzebny???
233 #
234 #make \
235 #       LDFLAGS="-s" \
236 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
237 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
238
239 # spec files for msvcrt*.dll configurations
240 cd gcc
241 for n in msvcrt msvcrt20 msvcrt40; do
242         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
243 done
244 )
245
246 %install
247 rm -rf $RPM_BUILD_ROOT
248
249 install -d $RPM_BUILD_ROOT%{_bindir}
250 install -d $RPM_BUILD_ROOT%{_datadir}
251 (cd obj-%{target_platform}
252
253 %{__make} install \
254         prefix=$RPM_BUILD_ROOT%{_prefix} \
255         bindir=$RPM_BUILD_ROOT%{arch}/bin \
256         mandir=$RPM_BUILD_ROOT%{_mandir} \
257         infodir=$RPM_BUILD_ROOT%{_infodir} \
258         gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++
259
260 cd gcc
261 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
262 )
263
264 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
265
266 # c++filt is provided by binutils
267 rm -f $RPM_BUILD_ROOT%{_bindir}/i386-mingw32-c++filt
268
269 # what is this there for???
270 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
271
272 # the same... make hardlink
273 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
274
275 %clean
276 rm -rf $RPM_BUILD_ROOT
277
278 %files
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_bindir}/%{target}-gcc
281 %attr(755,root,root) %{_bindir}/%{target}-*protoize
282 %dir %{arch}/bin
283 %attr(755,root,root) %{arch}/bin/cpp
284 %attr(755,root,root) %{arch}/bin/gcc
285 %attr(755,root,root) %{arch}/bin/gcov
286 %{arch}/include/_G_config.h
287 %{arch}/lib/libiberty.a
288 %dir %{gccarch}
289 %dir %{gcclib}
290 %attr(755,root,root) %{gcclib}/cc1
291 %attr(755,root,root) %{gcclib}/cpp0
292 %{gcclib}/SYSCALLS.c.X
293 %{gcclib}/libgcc.a
294 %{gcclib}/specs*
295 %dir %{gcclib}/include
296 %{gcclib}/include/float.h
297 %{gcclib}/include/iso646.h
298 %{gcclib}/include/limits.h
299 %{gcclib}/include/proto.h
300 %{gcclib}/include/stdarg.h
301 %{gcclib}/include/stdbool.h
302 %{gcclib}/include/stddef.h
303 %{gcclib}/include/syslimits.h
304 %{gcclib}/include/varargs.h
305 %{gcclib}/include/va-*.h
306 %{_mandir}/man1/%{target}-gcc.1*
307
308 %files c++
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
311 %{arch}/include/g++
312 %{arch}/lib/libstdc++.a
313 %attr(755,root,root) %{gcclib}/cc1plus
314 %{gcclib}/libstdc++*
315 %{gcclib}/include/new.h
316 %{gcclib}/include/exception
317 %{gcclib}/include/new
318 %{gcclib}/include/typeinfo
319 %{_mandir}/man1/%{target}-g++.1*
320
321 %files objc
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{gcclib}/cc1obj
324 %{gcclib}/libobjc.a
325 %{gcclib}/include/objc
326
327 %files g77
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_bindir}/%{target}-g77
330 %attr(755,root,root) %{gcclib}/f771
331 %{_mandir}/man1/%{target}-g77.1*
332
333 %files chill
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_bindir}/%{target}-chill
336 %attr(755,root,root) %{gcclib}/cc1chill
337 %{gcclib}/chillrt0.o
338 %{gcclib}/libchill.a
339
340 %files java
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_bindir}/%{target}-gcj
343 %attr(755,root,root) %{arch}/bin/gcjh
344 %attr(755,root,root) %{arch}/bin/jcf-dump
345 %attr(755,root,root) %{arch}/bin/jv-scan
346 %attr(755,root,root) %{gcclib}/jc1
347 %attr(755,root,root) %{gcclib}/jvgenmain
This page took 0.089113 seconds and 3 git commands to generate.