source: rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec @ 2733f477

4.104.115
Last change on this file since 2733f477 was 2733f477, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 27, 2010 at 3:28:28 AM

Regenerate.

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