source: rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec @ 6d614c47

4.104.11
Last change on this file since 6d614c47 was 6d614c47, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 9, 2010 at 2:56:59 AM

gcc-4.5.0-RC-20100406.

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