source: rtems/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec @ 56c56501

4.10
Last change on this file since 56c56501 was 56c56501, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/10/11 at 12:25:26

Regenerate.

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