source: rtems/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec @ 5faedff

4.104.11
Last change on this file since 5faedff was 5faedff, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 20, 2009 at 9:28:37 AM

Regenerate.

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