source: rtems/scripts/gccnewlib/gccnewlib.add @ ab591073

4.104.114.84.95
Last change on this file since ab591073 was ab591073, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/31/03 at 07:29:27

2003-01-31 Ralf Corsepius <corsepiu@…>

  • common/common.add.in: Add Vendor, Distribution, BuildRoot?.
  • binutils/Makefile.am: Fix path to clean.add.
  • binutils/binutils.add: Remove BuildRoot?.
  • cpukit/Makefile.am: Use $(top_builddir)/common/common.add, $(top_builddir)/common/clean.add, header.add. Generate rtems-cpukit.spec.in.
  • cpukit/header.add: New.
  • cpukit/rtems-cpukit.spec.in: Remove.
  • cpukit/rtems-cpukit.add: New.
  • gccnewlib/gccnewlib.add: Remove Buildroot.
  • gdb/gdb.add: Remove Buildroot.
  • rtemsdoc/rtemsdoc.add: Remove BuildRoot?.
  • Property mode set to 100644
File size: 4.1 KB
Line 
1Name:         @target_alias@-gcc-newlib
2Summary:      gcc and newlib C Library for @target_alias@.
3Group:        rtems
4Release:      @Release@
5License:      gcc is GPL/LGPL ; newlib no has restrictions on run-time usage
6
7Autoreqprov:    on
8Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
9
10Version:        gcc@gcc_version@newlib@newlib_version@
11# gcc 3.x and gcc 2.9
12# Source0:      ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.bz2
13# gcc 2.95.x
14Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-everything-@gcc_version@.tar.gz
15Source1:        ftp://sources.redhat.com/pub/newlib/newlib-@newlib_version@.tar.gz
16Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
17Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
18
19#
20# The original sources are not included in the source RPM.
21# If we included them, then the source RPMs for each target
22# would duplicate MBs of source unnecessarily.  This is
23# a duplication of over 30 MBs of source for each of
24# the more than 10 targets it is possible to build.
25#
26# You can get them yourself from the Internet and copy them to
27# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
28# Or you can try the ftp options of rpm :-)
29#
30NoSource:       0
31NoSource:       1
32
33%description
34RTEMS is an open source operating system for embedded systems.
35
36This is gcc's and newlib C Library's sources with patches for RTEMS.
37
38 The original sources are not included in the source RPM.
39 If we included them, then the source RPMs for each target
40 would duplicate MBs of source unnecessarily.  This is
41 a duplication of over 30 MBs of source for each of
42 the more than 10 targets it is possible to build.
43
44 You can get them yourself from the Internet and copy them to
45 your /usr/src/[redhat|packages]/SOURCES directory ($RPM_SOURCE_DIR).
46 Or you can try the ftp options of rpm :-)
47
48%prep
49# untar the sources inside @target_alias@-gcc-newlib
50%setup -c -n %{name} -a 0 -a 1
51
52%patch0 -p0
53%patch1 -p0
54
55  # Copy the C library into gcc's source tree
56  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
57  test -d build || mkdir build
58
59%build
60  cd build
61
62  ../gcc-@gcc_version@/configure \
63    --target=@target_alias@ \
64    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
65    --enable-threads --prefix=%{_prefix} @GCCLANGS@
66
67  make all
68  make info
69
70%install
71  cd build
72  # Bug in gcc-2.95.1: It doesn't build this installation directory
73  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
74  ../gcc-@gcc_version@/mkinstalldirs \
75    $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
76
77  make prefix=$RPM_BUILD_ROOT%{_prefix} install
78  cd @target_alias@/newlib
79  make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
80
81  # cd back to build/
82  cd ../..
83
84  # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
85  # Rename it to target_alias-cpp
86  if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp%{_exeext};
87  then
88    mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp%{_exeext} \
89      $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp%{_exeext}
90  fi
91
92  # gzip info files
93  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
94  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null
95  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null
96
97  rm -f dirs ;
98  echo "%dir %{_prefix}/lib" >> dirs ;
99  echo "%dir %{_prefix}/lib/gcc-lib" >> dirs ;
100  echo "%dir %{_prefix}/lib/gcc-lib/@target_alias@" >> dirs ;
101
102  # Collect multilib subdirectories
103  TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
104  f=`gcc/xgcc --print-multi-lib | sed -e 's,;.*$,,'`
105  for i in $f; do
106    case $i in
107    \.) echo "%dir ${TGTDIR}" >> dirs
108      ;;
109    *)  echo "%dir ${TGTDIR}/$i" >> dirs
110      ;;
111    esac
112  done
113
114  # Collect files to go into different packages
115  cp dirs files.chill
116  cp dirs files.gcc
117  cp dirs files.g77
118  cp dirs files.objc
119  cp dirs files.gcj
120
121  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
122  for i in $f; do
123    case $i in
124    *chill*) echo "$i" >> files.chill ;;
125    *f771) ;;
126    *cc1obj) ;;
127    *libobjc*) echo "$i" >> files.objc ;;
128    *include/objc*) ;;
129    *jc1) ;;
130    *jvgenmain) ;;
131    *) echo "$i" >> files.gcc ;;
132    esac
133  done
134
Note: See TracBrowser for help on using the repository browser.