source: rtems/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec @ 719a5c7

4.104.11
Last change on this file since 719a5c7 was 719a5c7, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 7, 2008 at 2:54:05 AM

Regenerate.

  • Property mode set to 100644
File size: 18.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%else
25%define _exeext %{nil}
26%endif
27
28%ifos cygwin cygwin32
29%define optflags -O3 -pipe -march=i486 -funroll-loops
30%define _libdir                 %{_exec_prefix}/lib
31%define debug_package           %{nil}
32%endif
33
34%if "%{_build}" != "%{_host}"
35%define _host_rpmprefix rtems-4.10-%{_host}-
36%else
37%define _host_rpmprefix %{nil}
38%endif
39
40
41%define gcc_pkgvers 4.3.2
42%define gcc_version 4.3.2
43%define gcc_rpmvers %{expand:%(echo "4.3.2" | tr - _ )}
44
45%define newlib_version          1.16.0
46%define gccnewlib_version       gcc%{gcc_version}newlib%{newlib_version}
47
48%define mpfr_version    2.3.1
49
50Name:           rtems-4.10-sh-rtems4.10-gcc
51Summary:        sh-rtems4.10 gcc
52
53Group:          Development/Tools
54Version:        %{gcc_rpmvers}
55Release:        8%{?dist}
56License:        GPL
57URL:            http://gcc.gnu.org
58BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
59
60%define _use_internal_dependency_generator 0
61
62BuildRequires:  %{_host_rpmprefix}gcc
63
64%if "%{gcc_version}" >= "4.3.0"
65BuildRequires:  gmp-devel >= 4.1
66%if "%{_build}" != "%{_host}"
67BuildRequires:  %{_host_rpmprefix}gmp-devel
68BuildRequires:  %{_host_rpmprefix}mpfr-devel
69%endif
70%if 0%{?fedora} >= 8
71BuildRequires:  mpfr-devel >= 2.3.0
72%endif
73%if "%{?suse}" > "10.3"
74BuildRequires:  mpfr-devel >= 2.3.0
75%endif
76# These distros ship an insufficient mpfr
77%{?el4:%define  _build_mpfr     1}
78%{?suse10_2:%define     _build_mpfr     1}
79%{?suse10_3:%define     _build_mpfr     1}
80%endif
81
82%if "%{_build}" != "%{_host}"
83BuildRequires:  rtems-4.10-sh-rtems4.10-gcc
84%endif
85
86%if "%{gcc_version}" >= "4.2.0"
87BuildRequires:  flex bison
88%endif
89
90
91BuildRequires:  texinfo >= 4.2
92BuildRequires:  rtems-4.10-sh-rtems4.10-binutils
93
94Requires:       rtems-4.10-gcc-common
95Requires:       rtems-4.10-sh-rtems4.10-binutils
96Requires:       rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-%{release}
97
98
99%if "%{gcc_version}" >= "3.4"
100%define gcclib %{_libdir}/gcc
101%define gccexec %{_libexecdir}/gcc
102%else
103%define gcclib %{_libdir}/gcc-lib
104%define gccexec %{_libdir}/gcc-lib
105%endif
106
107%if "%{gcc_version}" == "4.3.2"
108Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
109Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.3.2-rtems4.10-20080828.diff
110%endif
111%if "%{gcc_version}" == "4.3.1"
112Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
113Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.3.1-rtems4.9-20080628.diff
114%endif
115%{?_without_sources:NoSource:   0}
116
117%if "%{gcc_version}" == "4.3.2"
118Source1:        ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
119%endif
120%if "%{gcc_version}" == "4.3.1"
121Source1:        ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
122%endif
123%{?_without_sources:NoSource:   1}
124
125Source50:       ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}.tar.gz
126%if "%{newlib_version}" == "1.16.0"
127Patch50:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.16.0-rtems4.10-20080827.diff
128%endif
129%{?_without_sources:NoSource:   50}
130
131%if "%{gcc_version}" >= "4.3.0"
132Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
133%endif
134
135%description
136Cross gcc for sh-rtems4.10.
137
138%prep
139%setup -c -T -n %{name}-%{version}
140
141%setup -q -T -D -n %{name}-%{version} -a0
142%{?PATCH0:%patch0 -p0}
143
144%setup -q -T -D -n %{name}-%{version} -a1
145%{?PATCH1:%patch1 -p0}
146
147
148
149
150
151%setup -q -T -D -n %{name}-%{version} -a50
152cd newlib-%{newlib_version}
153%{?PATCH50:%patch50 -p1}
154cd ..
155  # Copy the C library into gcc's source tree
156  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
157
158%if 0%{?_build_mpfr}
159%setup -q -T -D -n %{name}-%{version} -a60
160%{?PATCH60:%patch60 -p1}
161  # Build mpfr one-tree style
162  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
163%endif
164
165%if "%{gcc_version}" < "4.1.0"
166  sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%release)/' \
167  gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~
168%else
169  sed -e 's/^#define VERSUFFIX.*$/#define VERSUFFIX \" (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%{release})\"/' \
170    gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~
171%endif
172  mv gcc-%{gcc_pkgvers}/gcc/version.c~ gcc-%{gcc_pkgvers}/gcc/version.c
173
174
175  # Fix timestamps
176  cd gcc-%{gcc_pkgvers}
177  contrib/gcc_update --touch
178  cd ..
179%build
180  mkdir -p build
181
182  cd build
183
184  languages="c"
185  languages="$languages,c++"
186  export PATH="%{_bindir}:${PATH}"
187%if "%{_build}" != "%{_host}"
188  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
189  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
190%else
191# gcc is not ready to be compiled with -std=gnu99
192  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
193%endif
194  ../gcc-%{gcc_pkgvers}/configure \
195    --prefix=%{_prefix} \
196    --bindir=%{_bindir} \
197    --exec_prefix=%{_exec_prefix} \
198    --includedir=%{_includedir} \
199    --libdir=%{_libdir} \
200    --libexecdir=%{_libexecdir} \
201    --mandir=%{_mandir} \
202    --infodir=%{_infodir} \
203    --datadir=%{_datadir} \
204    --build=%_build --host=%_host \
205    --target=sh-rtems4.10 \
206    --disable-libstdcxx-pch \
207    --with-gnu-as --with-gnu-ld --verbose \
208    --with-newlib \
209    --with-system-zlib \
210    --disable-nls --without-included-gettext \
211    --disable-win32-registry \
212    --enable-version-specific-runtime-libs \
213    --enable-threads \
214    --enable-newlib-io-c99-formats \
215    --enable-languages="$languages" $optargs
216
217%if "%_host" != "%_build"
218  # Bug in gcc-3.2.1:
219  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
220  mkdir -p gcc/include
221  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
222%endif
223
224  make %{?_smp_mflags} all
225  make info
226  cd ..
227
228%install
229  export PATH="%{_bindir}:${PATH}"
230  rm -rf $RPM_BUILD_ROOT
231
232  cd build
233
234  make DESTDIR=$RPM_BUILD_ROOT install
235  cd ..
236
237  cd build/sh-rtems4.10/newlib
238  make DESTDIR=$RPM_BUILD_ROOT install-info
239  cd ../../..
240
241%if "%{gcc_version}" <= "4.1.2"
242# Misplaced header file
243  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
244    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
245      $RPM_BUILD_ROOT%{gcclib}/sh-rtems4.10/%{gcc_version}/include/
246  fi
247%endif
248
249  # host library
250  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
251
252  # We use the version from binutils
253  rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-c++filt%{_exeext}
254
255
256  # We don't ship info/dir
257  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
258  touch $RPM_BUILD_ROOT%{_infodir}/dir
259
260
261%if "%{gcc_version}" >= "3.4"
262  # Bug in gcc-3.4.0pre
263  rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-sh-rtems4.10-gcjh%{_exeext}
264%endif
265
266%if "%{gcc_version}" >= "3.3"
267  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
268  # the fixinclude-install-tools
269  rm -rf ${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/%{gcc_version}/install-tools
270  rm -rf ${RPM_BUILD_ROOT}%{gccexec}/sh-rtems4.10/%{gcc_version}/install-tools
271%endif
272
273  # Collect multilib subdirectories
274  f=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
275
276  echo "%defattr(-,root,root,-)" > build/files.newlib
277  TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib"
278  for i in $f; do
279    case $i in
280    \.) echo "%dir ${TGTDIR}" >> build/files.newlib
281      ;;
282    *)  echo "%dir ${TGTDIR}/$i" >> build/files.newlib
283      ;;
284    esac
285  done
286
287  rm -f dirs ;
288  echo "%defattr(-,root,root,-)" >> dirs
289  echo "%dir %{_prefix}" >> dirs
290  echo "%dir %{_libdir}" >> dirs
291%if "%{gcc_version}" >= "3.4"
292  echo "%dir %{_libexecdir}" >> dirs
293%endif
294  echo "%dir %{gcclib}" >> dirs
295  echo "%dir %{gcclib}/sh-rtems4.10" >> dirs
296
297  TGTDIR="%{gcclib}/sh-rtems4.10/%{gcc_version}"
298  for i in $f; do
299    case $i in
300    \.) echo "%dir ${TGTDIR}" >> dirs
301      ;;
302    *)  echo "%dir ${TGTDIR}/$i" >> dirs
303      ;;
304    esac
305  done
306
307  # Collect files to go into different packages
308  cp dirs build/files.gcc
309  cp dirs build/files.g77
310  cp dirs build/files.gfortran
311  cp dirs build/files.objc
312  cp dirs build/files.gcj
313  cp dirs build/files.g++
314
315  TGTDIR="%{gcclib}/sh-rtems4.10/%{gcc_version}"
316  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
317  for i in $f; do
318    case $i in
319    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
320    *f771) ;;
321    *f951) ;;
322    *cc1) ;;
323    *cc1obj) ;;
324    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
325    *collect2) ;;
326    *libobjc*) echo "$i" >> build/files.objc ;;
327    *include/objc*) ;;
328    *include/g++*);;
329    *include/c++*);;
330    *adainclude*);;
331    *adalib*);;
332    *gnat1);;
333    *jc1) ;;
334    *jvgenmain) ;;
335    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
336    */libstdc++.*) echo "$i" >> build/files.g++ ;;
337    */libsupc++.*) echo "$i" >> build/files.g++ ;;
338    *) echo "$i" >> build/files.gcc ;;
339    esac
340  done
341
342  TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib"
343  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
344  for i in $f; do
345    case $i in
346    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
347    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
348# all other files belong to newlib
349    *) echo "$i" >> build/files.newlib ;;
350    esac
351  done
352# Extract %%__os_install_post into os_install_post~
353cat << \EOF > os_install_post~
354%__os_install_post
355EOF
356
357# Generate customized brp-*scripts
358cat os_install_post~ | while read a x y; do
359case $a in
360# Prevent brp-strip* from trying to handle foreign binaries
361*/brp-strip*)
362  b=$(basename $a)
363  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
364  chmod a+x $b
365  ;;
366# Fix up brp-compress to handle %%_prefix != /usr
367*/brp-compress*)
368  b=$(basename $a)
369  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
370  chmod a+x $b
371  ;;
372esac
373done
374
375sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
376  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
377< os_install_post~ > os_install_post
378%define __os_install_post . ./os_install_post
379
380
381cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
382#!/bin/sh
383grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \
384  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/' | %__find_provides
385EOF
386chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
387%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
388
389cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
390#!/bin/sh
391grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \
392  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/sh-rtems4.10/' | %__find_requires
393EOF
394chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
395%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
396
397
398# Extract %%__debug_install_post into debug_install_post~
399cat << \EOF > debug_install_post~
400%__debug_install_post
401EOF
402
403# Generate customized debug_install_post script
404cat debug_install_post~ | while read a x y; do
405case $a in
406# Prevent find-debuginfo.sh* from trying to handle foreign binaries
407*/find-debuginfo.sh)
408  b=$(basename $a)
409  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
410  chmod a+x $b
411  ;;
412esac
413done
414
415sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
416< debug_install_post~ > debug_install_post
417%define __debug_install_post . ./debug_install_post
418
419
420%clean
421  rm -rf $RPM_BUILD_ROOT
422
423# ==============================================================
424# rtems-4.10-sh-rtems4.10-gcc
425# ==============================================================
426# %package -n rtems-4.10-sh-rtems4.10-gcc
427# Summary:        GNU cc compiler for sh-rtems4.10
428# Group:          Development/Tools
429# Version:        %{gcc_rpmvers}
430# Requires:       rtems-4.10-sh-rtems4.10-binutils
431# Requires:       rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-%{release}
432# License:      GPL
433
434# %if %build_infos
435# Requires:      rtems-4.10-gcc-common
436# %endif
437
438%description -n rtems-4.10-sh-rtems4.10-gcc
439GNU cc compiler for sh-rtems4.10.
440
441%files -n rtems-4.10-sh-rtems4.10-gcc -f build/files.gcc
442%defattr(-,root,root)
443%dir %{_mandir}
444%dir %{_mandir}/man1
445%{_mandir}/man1/sh-rtems4.10-gcc.1*
446%if "%{gcc_version}" >= "3.4"
447%{_mandir}/man1/sh-rtems4.10-cpp.1*
448%{_mandir}/man1/sh-rtems4.10-gcov.1*
449%endif
450
451%dir %{_bindir}
452%{_bindir}/sh-rtems4.10-cpp%{_exeext}
453%{_bindir}/sh-rtems4.10-gcc%{_exeext}
454%if "%{gcc_version}" >= "3.3"
455%{_bindir}/sh-rtems4.10-gcc-%{gcc_version}%{_exeext}
456%endif
457%{_bindir}/sh-rtems4.10-gcov%{_exeext}
458%{_bindir}/sh-rtems4.10-gccbug
459
460%dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include
461%if "%{gcc_version}" > "4.0.3"
462%if "sh-rtems4.10" != "bfin-rtems4.10"
463%if "sh-rtems4.10" != "avr-rtems4.10"
464%dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include/ssp
465%endif
466%endif
467%endif
468
469%if "%{gcc_version}" >= "4.3.0"
470%dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include-fixed
471%endif
472
473%dir %{gccexec}
474%dir %{gccexec}/sh-rtems4.10
475%dir %{gccexec}/sh-rtems4.10/%{gcc_version}
476%{gccexec}/sh-rtems4.10/%{gcc_version}/cc1%{_exeext}
477%{gccexec}/sh-rtems4.10/%{gcc_version}/collect2%{_exeext}
478
479# ==============================================================
480# rtems-4.10-gcc-common
481# ==============================================================
482%package -n rtems-4.10-gcc-common
483Summary:        Base package for rtems gcc and newlib C Library
484Group:          Development/Tools
485Version:        %{gcc_rpmvers}
486License:        GPL
487
488Requires(post):         /sbin/install-info
489Requires(preun):        /sbin/install-info
490
491%description -n rtems-4.10-gcc-common
492GCC files that are shared by all targets.
493
494%files -n rtems-4.10-gcc-common
495%defattr(-,root,root)
496%dir %{_infodir}
497%ghost %{_infodir}/dir
498%{_infodir}/cpp.info*
499%{_infodir}/cppinternals.info*
500%{_infodir}/gcc.info*
501%{_infodir}/gccint.info*
502%if "%{gcc_version}" >= "3.4"
503%{_infodir}/gccinstall.info*
504%endif
505
506%dir %{_mandir}
507%if "%{gcc_version}" < "3.4"
508%dir %{_mandir}/man1
509%{_mandir}/man1/cpp.1*
510%{_mandir}/man1/gcov.1*
511%endif
512%dir %{_mandir}/man7
513%{_mandir}/man7/fsf-funding.7*
514%{_mandir}/man7/gfdl.7*
515%{_mandir}/man7/gpl.7*
516
517%post -n rtems-4.10-gcc-common
518  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
519  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
520  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
521  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
522%if "%{gcc_version}" >= "3.4"
523  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
524%endif
525
526%preun -n rtems-4.10-gcc-common
527if [ $1 -eq 0 ]; then
528  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
529  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
530  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
531  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
532%if "%{gcc_version}" >= "3.4"
533  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
534%endif
535fi
536
537# ==============================================================
538# rtems-4.10-sh-rtems4.10-gcc-c++
539# ==============================================================
540%package -n rtems-4.10-sh-rtems4.10-gcc-c++
541Summary:        GCC c++ compiler for sh-rtems4.10
542Group:          Development/Tools
543Version:        %{gcc_rpmvers}
544License:        GPL
545
546%if "%{_build}" != "%{_host}"
547BuildRequires:  rtems-4.10-sh-rtems4.10-gcc-c++
548%endif
549Provides:       rtems-4.10-sh-rtems4.10-c++ = %{gcc_rpmvers}-%{release}
550Obsoletes:      rtems-4.10-sh-rtems4.10-c++ < %{gcc_rpmvers}-%{release}
551
552Requires:       rtems-4.10-gcc-common
553Requires:       rtems-4.10-sh-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
554
555%description -n rtems-4.10-sh-rtems4.10-gcc-c++
556GCC c++ compiler for sh-rtems4.10.
557
558%files -n rtems-4.10-sh-rtems4.10-gcc-c++ -f build/files.g++
559%defattr(-,root,root)
560%{_mandir}/man1/sh-rtems4.10-g++.1*
561
562%{_bindir}/sh-rtems4.10-c++%{_exeext}
563%{_bindir}/sh-rtems4.10-g++%{_exeext}
564
565%dir %{gccexec}
566%dir %{gccexec}/sh-rtems4.10
567%dir %{gccexec}/sh-rtems4.10/%{gcc_version}
568%{gccexec}/sh-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
569
570%dir %{gcclib}/sh-rtems4.10/%{gcc_version}/include
571%if "%{gcc_version}" >= "3.2"
572%{gcclib}/sh-rtems4.10/%{gcc_version}/include/c++
573%else
574%{gcclib}/sh-rtems4.10/%{gcc_version}/include/g++
575%endif
576
577
578
579# ==============================================================
580# rtems-4.10-sh-rtems4.10-newlib
581# ==============================================================
582%package -n rtems-4.10-sh-rtems4.10-newlib
583Summary:        C Library (newlib) for sh-rtems4.10
584Group:          Development/Tools
585License:        Distributable
586Version:        %{newlib_version}
587
588Provides:       rtems-4.10-sh-rtems4.10-libc = %{newlib_version}-%{release}
589Obsoletes:      rtems-4.10-sh-rtems4.10-libc < %{newlib_version}-%{release}
590
591Requires:       rtems-4.10-newlib-common
592
593%description -n rtems-4.10-sh-rtems4.10-newlib
594Newlib C Library for sh-rtems4.10.
595
596%files -n rtems-4.10-sh-rtems4.10-newlib -f build/files.newlib
597%defattr(-,root,root)
598%dir %{_prefix}
599%dir %{_exec_prefix}/sh-rtems4.10
600%{_exec_prefix}/sh-rtems4.10/include
601
602# ==============================================================
603# rtems-4.10-newlib-common
604# ==============================================================
605%package -n rtems-4.10-newlib-common
606Summary:        Base package for RTEMS newlib C Library
607Group:          Development/Tools
608Version:        %{newlib_version}
609License:        Distributable
610
611Requires(post):         /sbin/install-info
612Requires(preun):        /sbin/install-info
613
614%description -n rtems-4.10-newlib-common
615newlib files that are shared by all targets.
616
617%files -n rtems-4.10-newlib-common
618%defattr(-,root,root)
619%dir %{_infodir}
620%ghost %{_infodir}/dir
621%{_infodir}/libc.info*
622%{_infodir}/libm.info*
623
624%post -n rtems-4.10-newlib-common
625  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
626  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
627
628%preun -n rtems-4.10-newlib-common
629if [ $1 -eq 0 ]; then
630  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
631  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
632fi
633
Note: See TracBrowser for help on using the repository browser.