source: rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec @ 60729c3

4.115
Last change on this file since 60729c3 was 60729c3, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jun 17, 2010 at 4:35:29 PM

Regenerate.

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