source: rtems/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec @ 4a23fa97

4.104.115
Last change on this file since 4a23fa97 was 4a23fa97, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/29/10 at 13:31:41

Regenerate.

  • Property mode set to 100644
File size: 22.0 KB
RevLine 
[2abe16dd]1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
[05c66cf]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
[2abe16dd]21
22%ifos cygwin cygwin32 mingw mingw32
23%define _exeext .exe
[35381baa]24%define debug_package           %{nil}
25%define _libdir                 %{_exec_prefix}/lib
[2abe16dd]26%else
27%define _exeext %{nil}
28%endif
29
30%ifos cygwin cygwin32
31%define optflags -O3 -pipe -march=i486 -funroll-loops
[35381baa]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
[2abe16dd]40%endif
41
42%if "%{_build}" != "%{_host}"
[6d3f0321]43%define _host_rpmprefix %{_host}-
[2abe16dd]44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48
[e9fd94ce]49%define gcc_pkgvers 4.4.3
[d40d7cd4]50%define gcc_version 4.4.3
51%define gcc_rpmvers %{expand:%(echo "4.4.3" | tr - _ )}
[2abe16dd]52
[86bde6f]53%define newlib_pkgvers          1.18.0
54%define newlib_version          1.18.0
[2abe16dd]55
56Name:           rtems-4.10-m32c-rtems4.10-gcc
57Summary:        m32c-rtems4.10 gcc
58
59Group:          Development/Tools
60Version:        %{gcc_rpmvers}
[4a23fa97]61Release:        7%{?dist}
[2abe16dd]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
[4a23fa97]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
[5faedff]92%endif
[4a23fa97]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
[5faedff]98%endif
99
[4a23fa97]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
[2abe16dd]110%endif
[4a23fa97]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
[2abe16dd]116%endif
[5faedff]117
[4a23fa97]118%if 0%{?suse11_1}
119%global mpc_provided %{nil}
120%global mpfr_provided 2.3.2
121%global gmp_provided 4.2.3
[e9fd94ce]122%endif
123
[4a23fa97]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
[e9fd94ce]140%endif
[5faedff]141
142%if "%{gcc_version}" >= "4.2.0"
143%endif
[4a23fa97]144
145%if "%{gcc_version}" >= "4.3.0"
146%define gmp_required            4.1
147%define mpfr_required           2.3.1
[5faedff]148%endif
[4a23fa97]149
150%if "%{gcc_version}" >= "4.3.3"
151%define cloog_required          0.15
[5faedff]152%endif
153
[4a23fa97]154%if "%{gcc_version}" >= "4.4.0"
155%define mpfr_required           2.3.2
156%endif
[5faedff]157
[4a23fa97]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
[5faedff]172%else
[4a23fa97]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}
[3521985b]180%if "%{_build}" != "%{_host}"
[4a23fa97]181BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
182%endif
[3521985b]183%else
[4a23fa97]184%define _build_gmp 1
[5faedff]185%endif
[3521985b]186%endif
[4a23fa97]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
[5faedff]194%else
[4a23fa97]195%define _build_libelf 1
196%endif
[5faedff]197%endif
198
[4a23fa97]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
[2abe16dd]218%endif
219
220%if "%{_build}" != "%{_host}"
[35381baa]221BuildRequires:  rtems-4.10-m32c-rtems4.10-gcc = %{gcc_rpmvers}
[2abe16dd]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
[e1b4795]232Requires:       rtems-4.10-gcc-common
[2abe16dd]233Requires:       rtems-4.10-m32c-rtems4.10-binutils
[016c9ea]234Requires:       rtems-4.10-m32c-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
[4a23fa97]235Requires:       rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-8%{?dist}
[2abe16dd]236
[4a23fa97]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
[2abe16dd]244
[4a23fa97]245%global _gcclibdir %{_prefix}/lib
[2abe16dd]246
[d40d7cd4]247%if "%{gcc_version}" == "4.4.3"
[dc94d043]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
[d40d7cd4]250%endif
[0c9bb8ad]251%if "%{gcc_version}" == "4.4.2"
[60c9ceb]252Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
[dc94d043]253Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.2-rtems4.10-20091104.diff
[c5575c9]254%endif
[2abe16dd]255%{?_without_sources:NoSource:   0}
256
[86bde6f]257%if "%{newlib_version}" == "1.18.0"
258Source50:       ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
[4a23fa97]259Patch50:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20100328.diff
[86bde6f]260%endif
[2abe16dd]261%{?_without_sources:NoSource:   50}
262
[4a23fa97]263%if 0%{?_build_mpfr}
[2abe16dd]264Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
265%endif
266
[4a23fa97]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
[2abe16dd]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
[4a23fa97]286cd gcc-%{gcc_pkgvers}
287%{?PATCH0:%patch0 -p1}
288cd ..
[2abe16dd]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
[4a23fa97]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}-7%{?dist}/newlib-%{newlib_version}-8%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
[2abe16dd]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
[05c66cf]348# gcc is not ready to be compiled with -std=gnu99
349  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
[2abe16dd]350%endif
351  ../gcc-%{gcc_pkgvers}/configure \
352    --prefix=%{_prefix} \
353    --bindir=%{_bindir} \
354    --exec_prefix=%{_exec_prefix} \
355    --includedir=%{_includedir} \
[cdc1b123]356    --libdir=%{_gcclibdir} \
[2abe16dd]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 \
[4a23fa97]371    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
372    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
[2abe16dd]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
[e1b4795]384  make info
[2abe16dd]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 \
[cdc1b123]404      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include/
[2abe16dd]405  fi
406%endif
407
408  # host library
[cdc1b123]409%if "%{gcc_version}" >= "4.2.0"
410  # libiberty doesn't honor --libdir, but always installs to a
411  # magically guessed _libdir
[2abe16dd]412  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
[cdc1b123]413%else
414  # libiberty installs to --libdir=...
415  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
416%endif
[2abe16dd]417
418  # We use the version from binutils
419  rm -f $RPM_BUILD_ROOT%{_bindir}/m32c-rtems4.10-c++filt%{_exeext}
420
421
[e1b4795]422  # We don't ship info/dir
423  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
424  touch $RPM_BUILD_ROOT%{_infodir}/dir
[2abe16dd]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
[cdc1b123]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
[2abe16dd]433
[241a259d]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
[49a5e79]438
[4a23fa97]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
[2abe16dd]446  # Collect multilib subdirectories
[016c9ea]447  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
[2abe16dd]448
449  echo "%defattr(-,root,root,-)" > build/files.newlib
450  TGTDIR="%{_exec_prefix}/m32c-rtems4.10/lib"
[016c9ea]451  for i in $multilibs; do
[2abe16dd]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
[cdc1b123]462  TGTDIR="%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}"
[016c9ea]463  for i in $multilibs; do
[2abe16dd]464    case $i in
[86c6f95b]465    \.) ;; # ignore, handled elsewhere
[2abe16dd]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
[cdc1b123]478  TGTDIR="%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}"
[2abe16dd]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++*);;
[016c9ea]493    *include-fixed/*);;
[cdc1b123]494    *finclude/*);;
[2abe16dd]495    *adainclude*);;
496    *adalib*);;
497    *gnat1);;
498    *jc1) ;;
499    *jvgenmain) ;;
500    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
[4a23fa97]501    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
502    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
[2abe16dd]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)' \
[cdc1b123]551  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32c-rtems4.10/'} | %__find_provides
[2abe16dd]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)' \
[cdc1b123]559  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32c-rtems4.10/'} | %__find_requires
[2abe16dd]560EOF
561chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
562%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
563
[f1322b47]564%ifnarch noarch
[05c66cf]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
[f1322b47]586%endif
[05c66cf]587
[2abe16dd]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
[4a23fa97]599# Requires:       rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-8%{?dist}
[2abe16dd]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
[016c9ea]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}
[4a23fa97]617Requires:       rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-8%{?dist}
[016c9ea]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
[2abe16dd]625%defattr(-,root,root)
[016c9ea]626%dir %{_prefix}
627
[2abe16dd]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
[016c9ea]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}
[4a23fa97]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
[016c9ea]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}
[cdc1b123]659%dir %{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include
[016c9ea]660
[2abe16dd]661%if "%{gcc_version}" > "4.0.3"
[cdc1b123]662%dir %{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include/ssp
[2abe16dd]663%endif
664
[719a5c7]665%if "%{gcc_version}" >= "4.3.0"
[016c9ea]666%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include-fixed
[719a5c7]667%endif
668
[e1b4795]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
[2abe16dd]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}
[4a23fa97]731Release:        8%{?dist}
[016c9ea]732%{?_with_noarch_subpackages:BuildArch: noarch}
[2abe16dd]733
[e1b4795]734Requires:       rtems-4.10-newlib-common
[2abe16dd]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)
[016c9ea]741%dir %{_exec_prefix}
[2abe16dd]742%dir %{_exec_prefix}/m32c-rtems4.10
743%{_exec_prefix}/m32c-rtems4.10/include
744
[e1b4795]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}
[4a23fa97]752Release:        8%{?dist}
[e1b4795]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.