source: rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec @ 4c59a1b0

4.104.115
Last change on this file since 4c59a1b0 was 4c59a1b0, checked in by Ralf Corsepius <ralf.corsepius@…>, on Mar 26, 2010 at 9:28:22 AM

Regenerate.

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