source: rtems/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec @ 016c9ea

4.104.11
Last change on this file since 016c9ea was 016c9ea, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 31, 2009 at 11:27:12 AM

Regenerate.

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