source: rtems/scripts/gccnewlib/gccnewlib.add @ 59292fe9

4.104.114.84.95
Last change on this file since 59292fe9 was 59292fe9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/31/03 at 06:22:09

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

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