1 | # |
---|
2 | # Please send bugfixes or comments to |
---|
3 | # http://www.rtems.org/bugzilla |
---|
4 | # |
---|
5 | |
---|
6 | %define _prefix /opt/rtems-4.10 |
---|
7 | %define _exec_prefix %{_prefix} |
---|
8 | %define _bindir %{_exec_prefix}/bin |
---|
9 | %define _sbindir %{_exec_prefix}/sbin |
---|
10 | %define _libexecdir %{_exec_prefix}/libexec |
---|
11 | %define _datarootdir %{_prefix}/share |
---|
12 | %define _datadir %{_datarootdir} |
---|
13 | %define _sysconfdir %{_prefix}/etc |
---|
14 | %define _sharedstatedir %{_prefix}/com |
---|
15 | %define _localstatedir %{_prefix}/var |
---|
16 | %define _includedir %{_prefix}/include |
---|
17 | %define _libdir %{_exec_prefix}/%{_lib} |
---|
18 | %define _mandir %{_datarootdir}/man |
---|
19 | %define _infodir %{_datarootdir}/info |
---|
20 | %define _localedir %{_datarootdir}/locale |
---|
21 | |
---|
22 | %ifos cygwin cygwin32 mingw mingw32 |
---|
23 | %define _exeext .exe |
---|
24 | %define debug_package %{nil} |
---|
25 | %else |
---|
26 | %define _exeext %{nil} |
---|
27 | %endif |
---|
28 | |
---|
29 | %ifos cygwin cygwin32 |
---|
30 | %define optflags -O3 -pipe -march=i486 -funroll-loops |
---|
31 | %define _libdir %{_exec_prefix}/lib |
---|
32 | %endif |
---|
33 | |
---|
34 | %if "%{_build}" != "%{_host}" |
---|
35 | %define _host_rpmprefix rtems-4.10-%{_host}- |
---|
36 | %else |
---|
37 | %define _host_rpmprefix %{nil} |
---|
38 | %endif |
---|
39 | |
---|
40 | |
---|
41 | %define gcc_pkgvers 4.3.2 |
---|
42 | %define gcc_version 4.3.2 |
---|
43 | %define gcc_rpmvers %{expand:%(echo "4.3.2" | tr - _ )} |
---|
44 | |
---|
45 | %define newlib_pkgvers 1.17.0 |
---|
46 | %define newlib_version 1.17.0 |
---|
47 | %define gccnewlib_version gcc%{gcc_version}newlib%{newlib_version} |
---|
48 | |
---|
49 | %define mpfr_version 2.3.1 |
---|
50 | |
---|
51 | Name: rtems-4.10-sh-rtems4.10-gcc |
---|
52 | Summary: sh-rtems4.10 gcc |
---|
53 | |
---|
54 | Group: Development/Tools |
---|
55 | Version: %{gcc_rpmvers} |
---|
56 | Release: 20%{?dist} |
---|
57 | License: GPL |
---|
58 | URL: http://gcc.gnu.org |
---|
59 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
60 | |
---|
61 | %define _use_internal_dependency_generator 0 |
---|
62 | |
---|
63 | BuildRequires: %{_host_rpmprefix}gcc |
---|
64 | |
---|
65 | %if "%{gcc_version}" >= "4.3.0" |
---|
66 | BuildRequires: gmp-devel >= 4.1 |
---|
67 | %if "%{_build}" != "%{_host}" |
---|
68 | BuildRequires: %{_host_rpmprefix}gmp-devel |
---|
69 | BuildRequires: %{_host_rpmprefix}mpfr-devel |
---|
70 | %endif |
---|
71 | %if 0%{?fedora} >= 8 |
---|
72 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
73 | %endif |
---|
74 | %if "%{?suse}" > "10.3" |
---|
75 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
76 | %endif |
---|
77 | # These distros ship an insufficient mpfr |
---|
78 | %{?el4:%define _build_mpfr 1} |
---|
79 | %{?suse10_2:%define _build_mpfr 1} |
---|
80 | %{?suse10_3:%define _build_mpfr 1} |
---|
81 | %endif |
---|
82 | |
---|
83 | %if "%{_build}" != "%{_host}" |
---|
84 | BuildRequires: rtems-4.10-sh-rtems4.10-gcc |
---|
85 | %endif |
---|
86 | |
---|
87 | %if "%{gcc_version}" >= "4.2.0" |
---|
88 | BuildRequires: flex bison |
---|
89 | %endif |
---|
90 | |
---|
91 | |
---|
92 | BuildRequires: texinfo >= 4.2 |
---|
93 | BuildRequires: rtems-4.10-sh-rtems4.10-binutils |
---|
94 | |
---|
95 | Requires: rtems-4.10-gcc-common |
---|
96 | Requires: rtems-4.10-sh-rtems4.10-binutils |
---|
97 | Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-%{release} |
---|
98 | |
---|
99 | |
---|
100 | %if "%{gcc_version}" >= "3.4" |
---|
101 | %define gcclib %{_libdir}/gcc |
---|
102 | %define gccexec %{_libexecdir}/gcc |
---|
103 | %else |
---|
104 | %define gcclib %{_libdir}/gcc-lib |
---|
105 | %define gccexec %{_libdir}/gcc-lib |
---|
106 | %endif |
---|
107 | |
---|
108 | %if "%{gcc_version}" == "4.3.2" |
---|
109 | Source0: ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 |
---|
110 | Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.3.2-rtems4.10-20081205.diff |
---|
111 | %endif |
---|
112 | %{?_without_sources:NoSource: 0} |
---|
113 | |
---|
114 | %if "%{gcc_version}" == "4.3.2" |
---|
115 | Source1: ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 |
---|
116 | %endif |
---|
117 | %{?_without_sources:NoSource: 1} |
---|
118 | |
---|
119 | %if "%{newlib_version}" == "1.17.0" |
---|
120 | Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz |
---|
121 | Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-%{newlib_pkgvers}-rtems4.10-20081223.diff |
---|
122 | %endif |
---|
123 | %{?_without_sources:NoSource: 50} |
---|
124 | |
---|
125 | %if "%{gcc_version}" >= "4.3.0" |
---|
126 | Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 |
---|
127 | %endif |
---|
128 | |
---|
129 | %description |
---|
130 | Cross gcc for sh-rtems4.10. |
---|
131 | |
---|
132 | %prep |
---|
133 | %setup -c -T -n %{name}-%{version} |
---|
134 | |
---|
135 | %setup -q -T -D -n %{name}-%{version} -a0 |
---|
136 | %{?PATCH0:%patch0 -p0} |
---|
137 | |
---|
138 | %setup -q -T -D -n %{name}-%{version} -a1 |
---|
139 | %{?PATCH1:%patch1 -p0} |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | %setup -q -T -D -n %{name}-%{version} -a50 |
---|
146 | cd newlib-%{newlib_version} |
---|
147 | %{?PATCH50:%patch50 -p1} |
---|
148 | cd .. |
---|
149 | # Copy the C library into gcc's source tree |
---|
150 | ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers} |
---|
151 | |
---|
152 | %if 0%{?_build_mpfr} |
---|
153 | %setup -q -T -D -n %{name}-%{version} -a60 |
---|
154 | %{?PATCH60:%patch60 -p1} |
---|
155 | # Build mpfr one-tree style |
---|
156 | ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr |
---|
157 | %endif |
---|
158 | |
---|
159 | %if "%{gcc_version}" < "4.1.0" |
---|
160 | sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%release)/' \ |
---|
161 | gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~ |
---|
162 | %else |
---|
163 | sed -e 's/^#define VERSUFFIX.*$/#define VERSUFFIX \" (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%{release})\"/' \ |
---|
164 | gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~ |
---|
165 | %endif |
---|
166 | mv gcc-%{gcc_pkgvers}/gcc/version.c~ gcc-%{gcc_pkgvers}/gcc/version.c |
---|
167 | |
---|
168 | |
---|
169 | # Fix timestamps |
---|
170 | cd gcc-%{gcc_pkgvers} |
---|
171 | contrib/gcc_update --touch |
---|
172 | cd .. |
---|
173 | %build |
---|
174 | mkdir -p build |
---|
175 | |
---|
176 | cd build |
---|
177 | |
---|
178 | languages="c" |
---|
179 | languages="$languages,c++" |
---|
180 | export PATH="%{_bindir}:${PATH}" |
---|
181 | %if "%{_build}" != "%{_host}" |
---|
182 | CFLAGS_FOR_BUILD="-g -O2 -Wall" \ |
---|
183 | CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \ |
---|
184 | %else |
---|
185 | # gcc is not ready to be compiled with -std=gnu99 |
---|
186 | CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \ |
---|
187 | %endif |
---|
188 | ../gcc-%{gcc_pkgvers}/configure \ |
---|
189 | --prefix=%{_prefix} \ |
---|
190 | --bindir=%{_bindir} \ |
---|
191 | --exec_prefix=%{_exec_prefix} \ |
---|
192 | --includedir=%{_includedir} \ |
---|
193 | --libdir=%{_libdir} \ |
---|
194 | --libexecdir=%{_libexecdir} \ |
---|
195 | --mandir=%{_mandir} \ |
---|
196 | --infodir=%{_infodir} \ |
---|
197 | --datadir=%{_datadir} \ |
---|
198 | --build=%_build --host=%_host \ |
---|
199 | --target=sh-rtems4.10 \ |
---|
200 | --disable-libstdcxx-pch \ |
---|
201 | --with-gnu-as --with-gnu-ld --verbose \ |
---|
202 | --with-newlib \ |
---|
203 | --with-system-zlib \ |
---|
204 | --disable-nls --without-included-gettext \ |
---|
205 | --disable-win32-registry \ |
---|
206 | --enable-version-specific-runtime-libs \ |
---|
207 | --enable-threads \ |
---|
208 | --enable-newlib-io-c99-formats \ |
---|
209 | --enable-languages="$languages" $optargs |
---|
210 | |
---|
211 | %if "%_host" != "%_build" |
---|
212 | # Bug in gcc-3.2.1: |
---|
213 | # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs |
---|
214 | mkdir -p gcc/include |
---|
215 | cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h |
---|
216 | %endif |
---|
217 | |
---|
218 | make %{?_smp_mflags} all |
---|
219 | make info |
---|
220 | cd .. |
---|
221 | |
---|
222 | %install |
---|
223 | export PATH="%{_bindir}:${PATH}" |
---|
224 | rm -rf $RPM_BUILD_ROOT |
---|
225 | |
---|
226 | cd build |
---|
227 | |
---|
228 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
229 | cd .. |
---|
230 | |
---|
231 | cd build/sh-rtems4.10/newlib |
---|
232 | make DESTDIR=$RPM_BUILD_ROOT install-info |
---|
233 | cd ../../.. |
---|
234 | |
---|
235 | %if "%{gcc_version}" <= "4.1.2" |
---|
236 | # Misplaced header file |
---|
237 | if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then |
---|
238 | mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \ |
---|
239 | $RPM_BUILD_ROOT%{gcclib}/sh-rtems4.10/%{gcc_version}/include/ |
---|
240 | fi |
---|
241 | %endif |
---|
242 | |
---|
243 | # host library |
---|
244 | rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a |
---|
245 | |
---|
246 | # We use the version from binutils |
---|
247 | rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-c++filt%{_exeext} |
---|
248 | |
---|
249 | |
---|
250 | # We don't ship info/dir |
---|
251 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
252 | touch $RPM_BUILD_ROOT%{_infodir}/dir |
---|
253 | |
---|
254 | |
---|
255 | %if "%{gcc_version}" >= "3.4" |
---|
256 | # Bug in gcc-3.4.0pre |
---|
257 | rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-sh-rtems4.10-gcjh%{_exeext} |
---|
258 | %endif |
---|
259 | |
---|
260 | %if "%{gcc_version}" >= "3.3" |
---|
261 | # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs |
---|
262 | # the fixinclude-install-tools |
---|
263 | rm -rf ${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/%{gcc_version}/install-tools |
---|
264 | rm -rf ${RPM_BUILD_ROOT}%{gccexec}/sh-rtems4.10/%{gcc_version}/install-tools |
---|
265 | %endif |
---|
266 | |
---|
267 | # Collect multilib subdirectories |
---|
268 | f=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'` |
---|
269 | |
---|
270 | echo "%defattr(-,root,root,-)" > build/files.newlib |
---|
271 | TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib" |
---|
272 | for i in $f; do |
---|
273 | case $i in |
---|
274 | \.) echo "%dir ${TGTDIR}" >> build/files.newlib |
---|
275 | ;; |
---|
276 | *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib |
---|
277 | ;; |
---|
278 | esac |
---|
279 | done |
---|
280 | |
---|
281 | rm -f dirs ; |
---|
282 | echo "%defattr(-,root,root,-)" >> dirs |
---|
283 | echo "%dir %{_prefix}" >> dirs |
---|
284 | echo "%dir %{_libdir}" >> dirs |
---|
285 | %if "%{gcc_version}" >= "3.4" |
---|
286 | echo "%dir %{_libexecdir}" >> dirs |
---|
287 | %endif |
---|
288 | echo "%dir %{gcclib}" >> dirs |
---|
289 | echo "%dir %{gcclib}/sh-rtems4.10" >> dirs |
---|
290 | |
---|
291 | TGTDIR="%{gcclib}/sh-rtems4.10/%{gcc_version}" |
---|
292 | for i in $f; do |
---|
293 | case $i in |
---|
294 | \.) echo "%dir ${TGTDIR}" >> dirs |
---|
295 | ;; |
---|
296 | *) echo "%dir ${TGTDIR}/$i" >> dirs |
---|
297 | ;; |
---|
298 | esac |
---|
299 | done |
---|
300 | |
---|
301 | # Collect files to go into different packages |
---|
302 | cp dirs build/files.gcc |
---|
303 | cp dirs build/files.g77 |
---|
304 | cp dirs build/files.gfortran |
---|
305 | cp dirs build/files.objc |
---|
306 | cp dirs build/files.gcj |
---|
307 | cp dirs build/files.g++ |
---|
308 | |
---|
309 | TGTDIR="%{gcclib}/sh-rtems4.10/%{gcc_version}" |
---|
310 | f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; |
---|
311 | for i in $f; do |
---|
312 | case $i in |
---|
313 | *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs |
---|
314 | *f771) ;; |
---|
315 | *f951) ;; |
---|
316 | *cc1) ;; |
---|
317 | *cc1obj) ;; |
---|
318 | *cc1plus) ;; # ignore: explicitly put into rpm elsewhere |
---|
319 | *collect2) ;; |
---|
320 | *libobjc*) echo "$i" >> build/files.objc ;; |
---|
321 | *include/objc*) ;; |
---|
322 | *include/g++*);; |
---|
323 | *include/c++*);; |
---|
324 | *adainclude*);; |
---|
325 | *adalib*);; |
---|
326 | *gnat1);; |
---|
327 | *jc1) ;; |
---|
328 | *jvgenmain) ;; |
---|
329 | */libgfortran*.*) echo "$i" >> build/files.gfortran ;; |
---|
330 | */libstdc++.*) echo "$i" >> build/files.g++ ;; |
---|
331 | */libsupc++.*) echo "$i" >> build/files.g++ ;; |
---|
332 | *) echo "$i" >> build/files.gcc ;; |
---|
333 | esac |
---|
334 | done |
---|
335 | |
---|
336 | TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib" |
---|
337 | f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; |
---|
338 | for i in $f; do |
---|
339 | case $i in |
---|
340 | *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs |
---|
341 | *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed |
---|
342 | # all other files belong to newlib |
---|
343 | *) echo "$i" >> build/files.newlib ;; |
---|
344 | esac |
---|
345 | done |
---|
346 | # Extract %%__os_install_post into os_install_post~ |
---|
347 | cat << \EOF > os_install_post~ |
---|
348 | %__os_install_post |
---|
349 | EOF |
---|
350 | |
---|
351 | # Generate customized brp-*scripts |
---|
352 | cat os_install_post~ | while read a x y; do |
---|
353 | case $a in |
---|
354 | # Prevent brp-strip* from trying to handle foreign binaries |
---|
355 | */brp-strip*) |
---|
356 | b=$(basename $a) |
---|
357 | sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b |
---|
358 | chmod a+x $b |
---|
359 | ;; |
---|
360 | # Fix up brp-compress to handle %%_prefix != /usr |
---|
361 | */brp-compress*) |
---|
362 | b=$(basename $a) |
---|
363 | sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b |
---|
364 | chmod a+x $b |
---|
365 | ;; |
---|
366 | esac |
---|
367 | done |
---|
368 | |
---|
369 | sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ |
---|
370 | -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \ |
---|
371 | < os_install_post~ > os_install_post |
---|
372 | %define __os_install_post . ./os_install_post |
---|
373 | |
---|
374 | |
---|
375 | cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
376 | #!/bin/sh |
---|
377 | grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \ |
---|
378 | | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/' | %__find_provides |
---|
379 | EOF |
---|
380 | chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
381 | %define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
382 | |
---|
383 | cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
384 | #!/bin/sh |
---|
385 | grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \ |
---|
386 | | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/' | %__find_requires |
---|
387 | EOF |
---|
388 | chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
389 | %define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
390 | |
---|
391 | %ifnarch noarch |
---|
392 | # Extract %%__debug_install_post into debug_install_post~ |
---|
393 | cat << \EOF > debug_install_post~ |
---|
394 | %__debug_install_post |
---|
395 | EOF |
---|
396 | |
---|
397 | # Generate customized debug_install_post script |
---|
398 | cat debug_install_post~ | while read a x y; do |
---|
399 | case $a in |
---|
400 | # Prevent find-debuginfo.sh* from trying to handle foreign binaries |
---|
401 | */find-debuginfo.sh) |
---|
402 | b=$(basename $a) |
---|
403 | sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b |
---|
404 | chmod a+x $b |
---|
405 | ;; |
---|
406 | esac |
---|
407 | done |
---|
408 | |
---|
409 | sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ |
---|
410 | < debug_install_post~ > debug_install_post |
---|
411 | %define __debug_install_post . ./debug_install_post |
---|
412 | |
---|
413 | %endif |
---|
414 | |
---|
415 | %clean |
---|
416 | rm -rf $RPM_BUILD_ROOT |
---|
417 | |
---|
418 | # ============================================================== |
---|
419 | # rtems-4.10-sh-rtems4.10-gcc |
---|
420 | # ============================================================== |
---|
421 | # %package -n rtems-4.10-sh-rtems4.10-gcc |
---|
422 | # Summary: GNU cc compiler for sh-rtems4.10 |
---|
423 | # Group: Development/Tools |
---|
424 | # Version: %{gcc_rpmvers} |
---|
425 | # Requires: rtems-4.10-sh-rtems4.10-binutils |
---|
426 | # Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-%{release} |
---|
427 | # License: GPL |
---|
428 | |
---|
429 | # %if %build_infos |
---|
430 | # Requires: rtems-4.10-gcc-common |
---|
431 | # %endif |
---|
432 | |
---|
433 | %description -n rtems-4.10-sh-rtems4.10-gcc |
---|
434 | GNU cc compiler for sh-rtems4.10. |
---|
435 | |
---|
436 | %files -n rtems-4.10-sh-rtems4.10-gcc -f build/files.gcc |
---|
437 | %defattr(-,root,root) |
---|
438 | %dir %{_mandir} |
---|
439 | %dir %{_mandir}/man1 |
---|
440 | %{_mandir}/man1/sh-rtems4.10-gcc.1* |
---|
441 | %if "%{gcc_version}" >= "3.4" |
---|
442 | %{_mandir}/man1/sh-rtems4.10-cpp.1* |
---|
443 | %{_mandir}/man1/sh-rtems4.10-gcov.1* |
---|
444 | %endif |
---|
445 | |
---|
446 | %dir %{_bindir} |
---|
447 | %{_bindir}/sh-rtems4.10-cpp%{_exeext} |
---|
448 | %{_bindir}/sh-rtems4.10-gcc%{_exeext} |
---|
449 | %if "%{gcc_version}" >= "3.3" |
---|
450 | %{_bindir}/sh-rtems4.10-gcc-%{gcc_version}%{_exeext} |
---|
451 | %endif |
---|
452 | %{_bindir}/sh-rtems4.10-gcov%{_exeext} |
---|
453 | %{_bindir}/sh-rtems4.10-gccbug |
---|
454 | |
---|
455 | %dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include |
---|
456 | %if "%{gcc_version}" > "4.0.3" |
---|
457 | %if "sh-rtems4.10" != "bfin-rtems4.10" |
---|
458 | %if "sh-rtems4.10" != "avr-rtems4.10" |
---|
459 | %dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include/ssp |
---|
460 | %endif |
---|
461 | %endif |
---|
462 | %endif |
---|
463 | |
---|
464 | %if "%{gcc_version}" >= "4.3.0" |
---|
465 | %dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include-fixed |
---|
466 | %endif |
---|
467 | |
---|
468 | %dir %{gccexec} |
---|
469 | %dir %{gccexec}/sh-rtems4.10 |
---|
470 | %dir %{gccexec}/sh-rtems4.10/%{gcc_version} |
---|
471 | %{gccexec}/sh-rtems4.10/%{gcc_version}/cc1%{_exeext} |
---|
472 | %{gccexec}/sh-rtems4.10/%{gcc_version}/collect2%{_exeext} |
---|
473 | |
---|
474 | # ============================================================== |
---|
475 | # rtems-4.10-gcc-common |
---|
476 | # ============================================================== |
---|
477 | %package -n rtems-4.10-gcc-common |
---|
478 | Summary: Base package for rtems gcc and newlib C Library |
---|
479 | Group: Development/Tools |
---|
480 | Version: %{gcc_rpmvers} |
---|
481 | License: GPL |
---|
482 | |
---|
483 | Requires(post): /sbin/install-info |
---|
484 | Requires(preun): /sbin/install-info |
---|
485 | |
---|
486 | %description -n rtems-4.10-gcc-common |
---|
487 | GCC files that are shared by all targets. |
---|
488 | |
---|
489 | %files -n rtems-4.10-gcc-common |
---|
490 | %defattr(-,root,root) |
---|
491 | %dir %{_infodir} |
---|
492 | %ghost %{_infodir}/dir |
---|
493 | %{_infodir}/cpp.info* |
---|
494 | %{_infodir}/cppinternals.info* |
---|
495 | %{_infodir}/gcc.info* |
---|
496 | %{_infodir}/gccint.info* |
---|
497 | %if "%{gcc_version}" >= "3.4" |
---|
498 | %{_infodir}/gccinstall.info* |
---|
499 | %endif |
---|
500 | |
---|
501 | %dir %{_mandir} |
---|
502 | %if "%{gcc_version}" < "3.4" |
---|
503 | %dir %{_mandir}/man1 |
---|
504 | %{_mandir}/man1/cpp.1* |
---|
505 | %{_mandir}/man1/gcov.1* |
---|
506 | %endif |
---|
507 | %dir %{_mandir}/man7 |
---|
508 | %{_mandir}/man7/fsf-funding.7* |
---|
509 | %{_mandir}/man7/gfdl.7* |
---|
510 | %{_mandir}/man7/gpl.7* |
---|
511 | |
---|
512 | %post -n rtems-4.10-gcc-common |
---|
513 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : |
---|
514 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || : |
---|
515 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : |
---|
516 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || : |
---|
517 | %if "%{gcc_version}" >= "3.4" |
---|
518 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || : |
---|
519 | %endif |
---|
520 | |
---|
521 | %preun -n rtems-4.10-gcc-common |
---|
522 | if [ $1 -eq 0 ]; then |
---|
523 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : |
---|
524 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || : |
---|
525 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : |
---|
526 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || : |
---|
527 | %if "%{gcc_version}" >= "3.4" |
---|
528 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || : |
---|
529 | %endif |
---|
530 | fi |
---|
531 | |
---|
532 | # ============================================================== |
---|
533 | # rtems-4.10-sh-rtems4.10-gcc-c++ |
---|
534 | # ============================================================== |
---|
535 | %package -n rtems-4.10-sh-rtems4.10-gcc-c++ |
---|
536 | Summary: GCC c++ compiler for sh-rtems4.10 |
---|
537 | Group: Development/Tools |
---|
538 | Version: %{gcc_rpmvers} |
---|
539 | License: GPL |
---|
540 | |
---|
541 | %if "%{_build}" != "%{_host}" |
---|
542 | BuildRequires: rtems-4.10-sh-rtems4.10-gcc-c++ |
---|
543 | %endif |
---|
544 | Provides: rtems-4.10-sh-rtems4.10-c++ = %{gcc_rpmvers}-%{release} |
---|
545 | Obsoletes: rtems-4.10-sh-rtems4.10-c++ < %{gcc_rpmvers}-%{release} |
---|
546 | |
---|
547 | Requires: rtems-4.10-gcc-common |
---|
548 | Requires: rtems-4.10-sh-rtems4.10-gcc = %{gcc_rpmvers}-%{release} |
---|
549 | |
---|
550 | %description -n rtems-4.10-sh-rtems4.10-gcc-c++ |
---|
551 | GCC c++ compiler for sh-rtems4.10. |
---|
552 | |
---|
553 | %files -n rtems-4.10-sh-rtems4.10-gcc-c++ -f build/files.g++ |
---|
554 | %defattr(-,root,root) |
---|
555 | %{_mandir}/man1/sh-rtems4.10-g++.1* |
---|
556 | |
---|
557 | %{_bindir}/sh-rtems4.10-c++%{_exeext} |
---|
558 | %{_bindir}/sh-rtems4.10-g++%{_exeext} |
---|
559 | |
---|
560 | %dir %{gccexec} |
---|
561 | %dir %{gccexec}/sh-rtems4.10 |
---|
562 | %dir %{gccexec}/sh-rtems4.10/%{gcc_version} |
---|
563 | %{gccexec}/sh-rtems4.10/%{gcc_version}/cc1plus%{_exeext} |
---|
564 | |
---|
565 | %dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include |
---|
566 | %if "%{gcc_version}" >= "3.2" |
---|
567 | %{gcclib}/sh-rtems4.10/%{gcc_version}/include/c++ |
---|
568 | %else |
---|
569 | %{gcclib}/sh-rtems4.10/%{gcc_version}/include/g++ |
---|
570 | %endif |
---|
571 | |
---|
572 | |
---|
573 | |
---|
574 | # ============================================================== |
---|
575 | # rtems-4.10-sh-rtems4.10-newlib |
---|
576 | # ============================================================== |
---|
577 | %package -n rtems-4.10-sh-rtems4.10-newlib |
---|
578 | Summary: C Library (newlib) for sh-rtems4.10 |
---|
579 | Group: Development/Tools |
---|
580 | License: Distributable |
---|
581 | Version: %{newlib_version} |
---|
582 | |
---|
583 | Provides: rtems-4.10-sh-rtems4.10-libc = %{newlib_version}-%{release} |
---|
584 | Obsoletes: rtems-4.10-sh-rtems4.10-libc < %{newlib_version}-%{release} |
---|
585 | |
---|
586 | Requires: rtems-4.10-newlib-common |
---|
587 | |
---|
588 | %description -n rtems-4.10-sh-rtems4.10-newlib |
---|
589 | Newlib C Library for sh-rtems4.10. |
---|
590 | |
---|
591 | %files -n rtems-4.10-sh-rtems4.10-newlib -f build/files.newlib |
---|
592 | %defattr(-,root,root) |
---|
593 | %dir %{_prefix} |
---|
594 | %dir %{_exec_prefix}/sh-rtems4.10 |
---|
595 | %{_exec_prefix}/sh-rtems4.10/include |
---|
596 | |
---|
597 | # ============================================================== |
---|
598 | # rtems-4.10-newlib-common |
---|
599 | # ============================================================== |
---|
600 | %package -n rtems-4.10-newlib-common |
---|
601 | Summary: Base package for RTEMS newlib C Library |
---|
602 | Group: Development/Tools |
---|
603 | Version: %{newlib_version} |
---|
604 | License: Distributable |
---|
605 | |
---|
606 | Requires(post): /sbin/install-info |
---|
607 | Requires(preun): /sbin/install-info |
---|
608 | |
---|
609 | %description -n rtems-4.10-newlib-common |
---|
610 | newlib files that are shared by all targets. |
---|
611 | |
---|
612 | %files -n rtems-4.10-newlib-common |
---|
613 | %defattr(-,root,root) |
---|
614 | %dir %{_infodir} |
---|
615 | %ghost %{_infodir}/dir |
---|
616 | %{_infodir}/libc.info* |
---|
617 | %{_infodir}/libm.info* |
---|
618 | |
---|
619 | %post -n rtems-4.10-newlib-common |
---|
620 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || : |
---|
621 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || : |
---|
622 | |
---|
623 | %preun -n rtems-4.10-newlib-common |
---|
624 | if [ $1 -eq 0 ]; then |
---|
625 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || : |
---|
626 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || : |
---|
627 | fi |
---|
628 | |
---|