source: rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec @ 2733f477

4.104.115
Last change on this file since 2733f477 was 2733f477, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 27, 2010 at 3:28:28 AM

Regenerate.

  • Property mode set to 100644
File size: 24.4 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.11
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 %{_host}-
44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48
49%define gcc_pkgvers 4.5.0
50%define gcc_version 4.5.0
51%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
52
53%define newlib_pkgvers          1.18.0
54%define newlib_version          1.18.0
55
56Name:           rtems-4.11-mips-rtems4.11-gcc
57Summary:        mips-rtems4.11 gcc
58
59Group:          Development/Tools
60Version:        %{gcc_rpmvers}
61Release:        10%{?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# FIXME: Disable lto for now, to avoid dependencies on libelf
71%bcond_with lto
72
73# FIXME: Disable python gdb scripts
74# ATM, no idea how to package them
75%bcond_with pygdb
76
77# FIXME: Disable GCC-plugin
78# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
79%bcond_with plugin
80
81# versions of libraries, we conditionally bundle if necessary
82%global mpc_version     0.8.1
83%global mpfr_version    2.4.1
84%global gmp_version     4.3.2
85%global libelf_version  0.8.13
86
87# versions of libraries these distros are known to ship
88%if 0%{?fc13}
89%global mpc_provided 0.8.1
90%global mpfr_provided 2.4.1
91%global gmp_provided 4.3.1
92%endif
93
94%if 0%{?fc12}
95%global mpc_provided 0.8
96%global mpfr_provided 2.4.1
97%global gmp_provided 4.3.1
98%endif
99
100%if 0%{?fc11}
101%global mpc_provided %{nil}
102%global mpfr_provided 2.4.1
103%global gmp_provided 4.2.4
104%endif
105
106%if 0%{?el6}
107%global mpc_provided %{nil}
108%global mpfr_provided 2.4.1
109%global gmp_provided 4.3.1
110%endif
111
112%if 0%{?el5}
113%global mpc_provided %{nil}
114%global mpfr_provided %{nil}
115%global gmp_provided 4.1.4
116%endif
117
118%if 0%{?suse11_0}
119%global mpc_provided %{nil}
120%global mpfr_provided 2.3.1
121%global gmp_provided 4.2.2
122%endif
123
124%if 0%{?suse11_1}
125%global mpc_provided %{nil}
126%global mpfr_provided 2.3.2
127%global gmp_provided 4.2.3
128%endif
129
130%if 0%{?suse11_2}
131%global mpc_provided 0.7
132%global mpfr_provided 2.4.1
133%global gmp_provided 4.3.1
134%endif
135
136%if 0%{?cygwin}
137%global mpc_provided 0.8
138%global mpfr_provided 2.4.1
139%global gmp_provided 4.3.1
140%endif
141
142%if 0%{?mingw32}
143%global mpc_provided 0.8.1
144%global mpfr_provided 2.4.1
145%global gmp_provided 4.3.2
146%endif
147
148%if "%{gcc_version}" >= "4.2.0"
149%endif
150
151%if "%{gcc_version}" >= "4.3.0"
152%define gmp_required            4.1
153%define mpfr_required           2.3.1
154%endif
155
156%if "%{gcc_version}" >= "4.3.3"
157%define cloog_required          0.15
158%endif
159
160%if "%{gcc_version}" >= "4.4.0"
161%define mpfr_required           2.3.2
162%endif
163
164%if "%{gcc_version}" >= "4.5.0"
165%define mpc_required            0.8
166%if %{with lto}
167%define libelf_required         0.8.12
168%endif
169%endif
170
171%if %{defined mpc_required}
172%if "%{mpc_provided}" >= "%{mpc_required}"
173%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
174%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
175%if "%{_build}" != "%{_host}"
176BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
177%endif
178%else
179%define _build_mpc 1
180%define gmp_required            4.2
181%endif
182%endif
183
184%if %{defined gmp_required}
185%if "%{gmp_provided}" >= "%{gmp_required}"
186BuildRequires: gmp-devel >= %{gmp_required}
187%if "%{_build}" != "%{_host}"
188BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
189%endif
190%else
191%define _build_gmp 1
192%endif
193%endif
194
195%if %{defined libelf_required}
196%if "%{libelf_provided}" >= "%{libelf_required}"
197BuildRequires: libelf-devel >= %{libelf_required}
198%if "%{_build}" != "%{_host}"
199BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
200%endif
201%else
202%define _build_libelf 1
203%endif
204%endif
205
206
207%if %{defined cloog_required}
208%{?fc11:BuildRequires: cloog-ppl-devel >= %cloog_required}
209%{?fc12:BuildRequires: cloog-ppl-devel >= %cloog_required}
210%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
211%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
212%{?suse11_2:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
213%{?suse11_1:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
214%endif
215
216
217%if %{defined mpfr_required}
218%if "%{mpfr_provided}" >= "%{mpfr_required}"
219BuildRequires: mpfr-devel >= %{mpfr_required}
220%if "%{_build}" != "%{_host}"
221BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
222%endif
223%else
224%define _build_mpfr 1
225%endif
226%endif
227
228%if "%{_build}" != "%{_host}"
229BuildRequires:  rtems-4.11-mips-rtems4.11-gcc = %{gcc_rpmvers}
230%endif
231
232%if "%{gcc_version}" >= "4.2.0"
233BuildRequires:  flex bison
234%endif
235
236
237BuildRequires:  texinfo >= 4.2
238BuildRequires:  rtems-4.11-mips-rtems4.11-binutils
239
240Requires:       rtems-4.11-gcc-common
241Requires:       rtems-4.11-mips-rtems4.11-binutils
242Requires:       rtems-4.11-mips-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
243Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-10%{?dist}
244
245%if "%{gcc_version}" >= "4.5.0"
246BuildRequires:  zlib-devel
247%if "%{_build}" != "%{_host}"
248BuildRequires:  %{_host_rpmprefix}zlib-devel
249%endif
250%else
251%endif
252
253%global _gcclibdir %{_prefix}/lib
254
255%if "%{gcc_version}" == "4.5.0"
256Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
257Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100414.diff
258%endif
259%if "%{gcc_version}" == "4.4.3"
260Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
261Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.3-rtems4.10-20100315.diff
262%endif
263%{?_without_sources:NoSource:   0}
264
265%if "%{gcc_version}" == "4.5.0"
266Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
267%endif
268%if "%{gcc_version}" == "4.4.3"
269Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
270%endif
271%{?_without_sources:NoSource:   1}
272
273%if "%{newlib_version}" == "1.18.0"
274Source50:       ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
275Patch50:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.11-20100423.diff
276%endif
277%{?_without_sources:NoSource:   50}
278
279%if 0%{?_build_mpfr}
280Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
281%endif
282
283%if 0%{?_build_mpc}
284Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
285%endif
286
287%if 0%{?_build_gmp}
288Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
289%endif
290
291%if 0%{?_build_libelf}
292Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
293%endif
294
295%description
296Cross gcc for mips-rtems4.11.
297
298%prep
299%setup -c -T -n %{name}-%{version}
300
301%setup -q -T -D -n %{name}-%{version} -a0
302cd gcc-%{gcc_pkgvers}
303%{?PATCH0:%patch0 -p1}
304cd ..
305
306%setup -q -T -D -n %{name}-%{version} -a1
307cd gcc-%{gcc_pkgvers}
308%{?PATCH1:%patch1 -p1}
309cd ..
310
311
312
313
314
315%setup -q -T -D -n %{name}-%{version} -a50
316cd newlib-%{newlib_version}
317%{?PATCH50:%patch50 -p1}
318cd ..
319  # Copy the C library into gcc's source tree
320  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
321
322%if 0%{?_build_mpfr}
323%setup -q -T -D -n %{name}-%{version} -a60
324%{?PATCH60:%patch60 -p1}
325  # Build mpfr one-tree style
326  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
327%endif
328
329%if 0%{?_build_mpc}
330%setup -q -T -D -n %{name}-%{version} -a61
331%{?PATCH61:%patch61 -p1}
332  # Build mpc one-tree style
333  ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
334%endif
335
336%if 0%{?_build_gmp}
337%setup -q -T -D -n %{name}-%{version} -a62
338%{?PATCH62:%patch62 -p1}
339  # Build gmp one-tree style
340  ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
341%endif
342
343%if 0%{?_build_libelf}
344%setup -q -T -D -n %{name}-%{version} -a63
345%{?PATCH63:%patch63 -p1}
346  # Build libelf one-tree style
347  ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
348%endif
349
350echo "RTEMS gcc-%{gcc_version}-10%{?dist}/newlib-%{newlib_version}-10%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
351
352
353  # Fix timestamps
354  cd gcc-%{gcc_pkgvers}
355  contrib/gcc_update --touch
356  cd ..
357%build
358  mkdir -p build
359
360  cd build
361
362  languages="c"
363  languages="$languages,c++"
364  export PATH="%{_bindir}:${PATH}"
365%if "%{_build}" != "%{_host}"
366  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
367  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
368%else
369# gcc is not ready to be compiled with -std=gnu99
370  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
371%endif
372  ../gcc-%{gcc_pkgvers}/configure \
373    --prefix=%{_prefix} \
374    --bindir=%{_bindir} \
375    --exec_prefix=%{_exec_prefix} \
376    --includedir=%{_includedir} \
377    --libdir=%{_gcclibdir} \
378    --libexecdir=%{_libexecdir} \
379    --mandir=%{_mandir} \
380    --infodir=%{_infodir} \
381    --datadir=%{_datadir} \
382    --build=%_build --host=%_host \
383    --target=mips-rtems4.11 \
384    --disable-libstdcxx-pch \
385    --with-gnu-as --with-gnu-ld --verbose \
386    --with-newlib \
387    --with-system-zlib \
388    --disable-nls --without-included-gettext \
389    --disable-win32-registry \
390    --enable-version-specific-runtime-libs \
391    --enable-threads \
392    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
393    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
394    --enable-newlib-io-c99-formats \
395    --enable-languages="$languages" $optargs
396
397%if "%_host" != "%_build"
398  # Bug in gcc-3.2.1:
399  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
400  mkdir -p gcc/include
401  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
402%endif
403
404  make %{?_smp_mflags} all
405  make info
406  cd ..
407
408%install
409  export PATH="%{_bindir}:${PATH}"
410  rm -rf $RPM_BUILD_ROOT
411
412  cd build
413
414  make DESTDIR=$RPM_BUILD_ROOT install
415  cd ..
416
417  cd build/mips-rtems4.11/newlib
418  make DESTDIR=$RPM_BUILD_ROOT install-info
419  cd ../../..
420
421%if "%{gcc_version}" <= "4.1.2"
422# Misplaced header file
423  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
424    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
425      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include/
426  fi
427%endif
428
429  # host library
430%if "%{gcc_version}" >= "4.2.0"
431  # libiberty doesn't honor --libdir, but always installs to a
432  # magically guessed _libdir
433  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
434%else
435  # libiberty installs to --libdir=...
436  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
437%endif
438
439  # We use the version from binutils
440  rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.11-c++filt%{_exeext}
441
442
443  # We don't ship info/dir
444  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
445  touch $RPM_BUILD_ROOT%{_infodir}/dir
446
447  # Bug in gcc-3.4.0pre
448  rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.11-mips-rtems4.11-gcjh%{_exeext}
449
450  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
451  # the fixinclude-install-tools
452  rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/install-tools
453  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/install-tools
454
455  # Bug in gcc > 4.1.0: Installs an unused, empty directory
456  if test -d ${RPM_BUILD_ROOT}%{_prefix}/mips-rtems4.11/include/bits; then
457    rmdir ${RPM_BUILD_ROOT}%{_prefix}/mips-rtems4.11/include/bits
458  fi
459
460  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
461%if ! %{with pygdb}
462  if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
463    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
464  fi
465%endif
466
467  # Collect multilib subdirectories
468  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
469
470  echo "%defattr(-,root,root,-)" > build/files.newlib
471  TGTDIR="%{_exec_prefix}/mips-rtems4.11/lib"
472  for i in $multilibs; do
473    case $i in
474    \.) echo "%dir ${TGTDIR}" >> build/files.newlib
475      ;;
476    *)  echo "%dir ${TGTDIR}/$i" >> build/files.newlib
477      ;;
478    esac
479  done
480
481  rm -f dirs ;
482  echo "%defattr(-,root,root,-)" >> dirs
483  TGTDIR="%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}"
484  for i in $multilibs; do
485    case $i in
486    \.) ;; # ignore, handled elsewhere
487    *)  echo "%dir ${TGTDIR}/$i" >> dirs
488      ;;
489    esac
490  done
491
492  # Collect files to go into different packages
493  cp dirs build/files.gcc
494  cp dirs build/files.gfortran
495  cp dirs build/files.objc
496  cp dirs build/files.gcj
497  cp dirs build/files.g++
498
499  TGTDIR="%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}"
500  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
501  for i in $f; do
502    case $i in
503    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
504    *f771) ;;
505    *f951) ;;
506    *cc1) ;;
507    *cc1obj) ;;
508    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
509    *collect2) ;;
510    *libobjc*) echo "$i" >> build/files.objc ;;
511    *include/objc*) ;;
512    *include/g++*);;
513    *include/c++*);;
514    *include-fixed/*);;
515    *finclude/*);;
516    *adainclude*);;
517    *adalib*);;
518    *gnat1);;
519    *jc1) ;;
520    *jvgenmain) ;;
521    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
522    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
523    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
524    */libstdc++.*) echo "$i" >> build/files.g++ ;;
525    */libsupc++.*) echo "$i" >> build/files.g++ ;;
526    *) echo "$i" >> build/files.gcc ;;
527    esac
528  done
529
530  TGTDIR="%{_exec_prefix}/mips-rtems4.11/lib"
531  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
532  for i in $f; do
533    case $i in
534    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
535    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
536# all other files belong to newlib
537    *) echo "$i" >> build/files.newlib ;;
538    esac
539  done
540# Extract %%__os_install_post into os_install_post~
541cat << \EOF > os_install_post~
542%__os_install_post
543EOF
544
545# Generate customized brp-*scripts
546cat os_install_post~ | while read a x y; do
547case $a in
548# Prevent brp-strip* from trying to handle foreign binaries
549*/brp-strip*)
550  b=$(basename $a)
551  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
552  chmod a+x $b
553  ;;
554# Fix up brp-compress to handle %%_prefix != /usr
555*/brp-compress*)
556  b=$(basename $a)
557  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
558  chmod a+x $b
559  ;;
560esac
561done
562
563sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
564  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
565< os_install_post~ > os_install_post
566%define __os_install_post . ./os_install_post
567
568
569cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
570#!/bin/sh
571grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.11/(lib|include|sys-root)' \
572  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.11/'} | %__find_provides
573EOF
574chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
575%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
576
577cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
578#!/bin/sh
579grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.11/(lib|include|sys-root)' \
580  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.11/'} | %__find_requires
581EOF
582chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
583%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
584
585%ifnarch noarch
586# Extract %%__debug_install_post into debug_install_post~
587cat << \EOF > debug_install_post~
588%__debug_install_post
589EOF
590
591# Generate customized debug_install_post script
592cat debug_install_post~ | while read a x y; do
593case $a in
594# Prevent find-debuginfo.sh* from trying to handle foreign binaries
595*/find-debuginfo.sh)
596  b=$(basename $a)
597  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
598  chmod a+x $b
599  ;;
600esac
601done
602
603sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
604< debug_install_post~ > debug_install_post
605%define __debug_install_post . ./debug_install_post
606
607%endif
608
609%clean
610  rm -rf $RPM_BUILD_ROOT
611
612# ==============================================================
613# rtems-4.11-mips-rtems4.11-gcc
614# ==============================================================
615# %package -n rtems-4.11-mips-rtems4.11-gcc
616# Summary:        GNU cc compiler for mips-rtems4.11
617# Group:          Development/Tools
618# Version:        %{gcc_rpmvers}
619# Requires:       rtems-4.11-mips-rtems4.11-binutils
620# Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-10%{?dist}
621# License:      GPL
622
623# %if %build_infos
624# Requires:      rtems-4.11-gcc-common
625# %endif
626
627%description -n rtems-4.11-mips-rtems4.11-gcc
628GNU cc compiler for mips-rtems4.11.
629
630# ==============================================================
631# rtems-4.11-mips-rtems4.11-gcc-libgcc
632# ==============================================================
633%package -n rtems-4.11-mips-rtems4.11-gcc-libgcc
634Summary:        libgcc for mips-rtems4.11-gcc
635Group:          Development/Tools
636Version:        %{gcc_rpmvers}
637%{?_with_noarch_subpackages:BuildArch: noarch}
638Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-10%{?dist}
639License:        GPL
640
641%description -n rtems-4.11-mips-rtems4.11-gcc-libgcc
642libgcc mips-rtems4.11-gcc.
643
644
645%files -n rtems-4.11-mips-rtems4.11-gcc
646%defattr(-,root,root)
647%dir %{_prefix}
648
649%dir %{_mandir}
650%dir %{_mandir}/man1
651%{_mandir}/man1/mips-rtems4.11-gcc.1*
652%{_mandir}/man1/mips-rtems4.11-cpp.1*
653%{_mandir}/man1/mips-rtems4.11-gcov.1*
654
655%dir %{_bindir}
656%{_bindir}/mips-rtems4.11-cpp%{_exeext}
657%{_bindir}/mips-rtems4.11-gcc%{_exeext}
658%{_bindir}/mips-rtems4.11-gcc-%{gcc_version}%{_exeext}
659%{_bindir}/mips-rtems4.11-gcov%{_exeext}
660%{_bindir}/mips-rtems4.11-gccbug
661
662%dir %{_libexecdir}
663%dir %{_libexecdir}/gcc
664%dir %{_libexecdir}/gcc/mips-rtems4.11
665%dir %{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}
666%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/cc1%{_exeext}
667%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/collect2%{_exeext}
668%if "%{gcc_version}" >= "4.5.0"
669%{?with_lto:%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/lto%{_exeext}}
670%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/lto-wrapper%{_exeext}
671%endif
672
673%files -n rtems-4.11-mips-rtems4.11-gcc-libgcc -f build/files.gcc
674%defattr(-,root,root)
675%dir %{_prefix}
676%dir %{_gcclibdir}
677%dir %{_gcclibdir}/gcc
678%dir %{_gcclibdir}/gcc/mips-rtems4.11
679%dir %{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}
680%dir %{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include
681
682%if "%{gcc_version}" > "4.0.3"
683%dir %{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include/ssp
684%endif
685
686%if "%{gcc_version}" >= "4.3.0"
687%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include-fixed
688%endif
689
690# ==============================================================
691# rtems-4.11-gcc-common
692# ==============================================================
693%package -n rtems-4.11-gcc-common
694Summary:        Base package for rtems gcc and newlib C Library
695Group:          Development/Tools
696Version:        %{gcc_rpmvers}
697%{?_with_noarch_subpackages:BuildArch: noarch}
698License:        GPL
699
700Requires(post):         /sbin/install-info
701Requires(preun):        /sbin/install-info
702
703%description -n rtems-4.11-gcc-common
704GCC files that are shared by all targets.
705
706%files -n rtems-4.11-gcc-common
707%defattr(-,root,root)
708%dir %{_prefix}
709%dir %{_prefix}/share
710
711%dir %{_infodir}
712%ghost %{_infodir}/dir
713%{_infodir}/cpp.info*
714%{_infodir}/cppinternals.info*
715%{_infodir}/gcc.info*
716%{_infodir}/gccint.info*
717%{_infodir}/gccinstall.info*
718
719%dir %{_mandir}
720%dir %{_mandir}/man7
721%{_mandir}/man7/fsf-funding.7*
722%{_mandir}/man7/gfdl.7*
723%{_mandir}/man7/gpl.7*
724
725%post -n rtems-4.11-gcc-common
726  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
727  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
728  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
729  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
730  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
731
732%preun -n rtems-4.11-gcc-common
733if [ $1 -eq 0 ]; then
734  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
735  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
736  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
737  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
738  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
739fi
740
741# ==============================================================
742# rtems-4.11-mips-rtems4.11-gcc-c++
743# ==============================================================
744%package -n rtems-4.11-mips-rtems4.11-gcc-c++
745Summary:        GCC c++ compiler for mips-rtems4.11
746Group:          Development/Tools
747Version:        %{gcc_rpmvers}
748License:        GPL
749Requires:       rtems-4.11-mips-rtems4.11-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
750
751%if "%{_build}" != "%{_host}"
752BuildRequires:  rtems-4.11-mips-rtems4.11-gcc-c++ = %{gcc_rpmvers}
753%endif
754
755Requires:       rtems-4.11-gcc-common
756Requires:       rtems-4.11-mips-rtems4.11-gcc = %{gcc_rpmvers}-%{release}
757
758%description -n rtems-4.11-mips-rtems4.11-gcc-c++
759GCC c++ compiler for mips-rtems4.11.
760
761
762%package -n rtems-4.11-mips-rtems4.11-gcc-libstdc++
763Summary:        libstdc++ for mips-rtems4.11
764Group:          Development/Tools
765Version:        %{gcc_rpmvers}
766%{?_with_noarch_subpackages:BuildArch: noarch}
767License:        GPL
768
769%description -n rtems-4.11-mips-rtems4.11-gcc-libstdc++
770%{summary}
771
772
773%files -n rtems-4.11-mips-rtems4.11-gcc-c++
774%defattr(-,root,root)
775%dir %{_prefix}
776
777%dir %{_mandir}
778%dir %{_mandir}/man1
779%{_mandir}/man1/mips-rtems4.11-g++.1*
780
781%dir %{_bindir}
782%{_bindir}/mips-rtems4.11-c++%{_exeext}
783%{_bindir}/mips-rtems4.11-g++%{_exeext}
784
785%dir %{_libexecdir}
786%dir %{_libexecdir}/gcc
787%dir %{_libexecdir}/gcc/mips-rtems4.11
788%dir %{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}
789%{_libexecdir}/gcc/mips-rtems4.11/%{gcc_version}/cc1plus%{_exeext}
790
791
792%files -n rtems-4.11-mips-rtems4.11-gcc-libstdc++ -f build/files.g++
793%defattr(-,root,root)
794%dir %{_prefix}
795%dir %{_gcclibdir}
796%dir %{_gcclibdir}/gcc
797%dir %{_gcclibdir}/gcc/mips-rtems4.11
798%dir %{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}
799%dir %{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include
800%{_gcclibdir}/gcc/mips-rtems4.11/%{gcc_version}/include/c++
801
802
803
804# ==============================================================
805# rtems-4.11-mips-rtems4.11-newlib
806# ==============================================================
807%package -n rtems-4.11-mips-rtems4.11-newlib
808Summary:        C Library (newlib) for mips-rtems4.11
809Group:          Development/Tools
810License:        Distributable
811Version:        %{newlib_version}
812Release:        10%{?dist}
813%{?_with_noarch_subpackages:BuildArch: noarch}
814
815Requires:       rtems-4.11-newlib-common
816
817%description -n rtems-4.11-mips-rtems4.11-newlib
818Newlib C Library for mips-rtems4.11.
819
820%files -n rtems-4.11-mips-rtems4.11-newlib -f build/files.newlib
821%defattr(-,root,root)
822%dir %{_exec_prefix}
823%dir %{_exec_prefix}/mips-rtems4.11
824%{_exec_prefix}/mips-rtems4.11/include
825
826# ==============================================================
827# rtems-4.11-newlib-common
828# ==============================================================
829%package -n rtems-4.11-newlib-common
830Summary:        Base package for RTEMS newlib C Library
831Group:          Development/Tools
832Version:        %{newlib_version}
833Release:        10%{?dist}
834%{?_with_noarch_subpackages:BuildArch: noarch}
835License:        Distributable
836
837Requires(post):         /sbin/install-info
838Requires(preun):        /sbin/install-info
839
840%description -n rtems-4.11-newlib-common
841newlib files that are shared by all targets.
842
843%files -n rtems-4.11-newlib-common
844%defattr(-,root,root)
845%dir %{_prefix}
846%dir %{_prefix}/share
847
848%dir %{_infodir}
849%ghost %{_infodir}/dir
850%{_infodir}/libc.info*
851%{_infodir}/libm.info*
852
853%post -n rtems-4.11-newlib-common
854  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
855  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
856
857%preun -n rtems-4.11-newlib-common
858if [ $1 -eq 0 ]; then
859  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
860  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
861fi
862
Note: See TracBrowser for help on using the repository browser.