source: rtems/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec @ e066e31e

4.104.11
Last change on this file since e066e31e was e066e31e, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 2, 2010 at 12:58:50 PM

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