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

4.104.115
Last change on this file since 098c204f was 098c204f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/29/10 at 12:20:02

Regenerate.

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