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