source: rtems/scripts/gccnewlib/gccnewlib.spec.in @ 4c46630

4.104.114.84.9
Last change on this file since 4c46630 was 4c46630, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 31, 2000 at 3:15:10 PM

Patch rtems-rc-20000118-1.diff from Ralf Corsepius <corsepiu@…>
that contains:

  • cleanups to configuration files
  • A reworked gccnewlib.spec.in: I have reformated it for enhanced readability and added more rtems-base packages. It now should be free of any installation conflicts (If there still remain some, they should be regarded as bugs).
  • A fix to the bin2boot RTEMS_BSP issue (make RTEMS_BSP="pc386 pc486" now works).
  • removes libbsp/bare/wrapup
  • Further cleanups
  • Property mode set to 100644
File size: 11.7 KB
Line 
1#
2# spec file for building gcc for rtems
3#
4# Copyright  (c) 1999,2000 OARCorp, Huntsville, AL
5#
6# please send bugfixes or comments to joel@OARcorp.com
7#
8
9Vendor:       OAR Corporation
10Distribution: Linux
11Name:         @target_alias@-gcc-newlib
12Summary:      gcc and newlib C Library for @target_alias@.
13Group:        rtems
14Release:      @Release@
15Copyright:    1999 OARCorp
16
17Provides:       rtems-base-gcc @target_alias@-gcc
18Provides:       rtems-base-chill @target_alias@-chill
19Provides:       rtems-base-gcj @target_alias@-gcj
20Provides:       rtems-base-g77 @target_alias@-g77
21Provides:       @target_alias@-objc
22Requires:       @target_alias@-binutils
23
24Autoreqprov:    on
25Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
26
27Version:        gcc@gcc_version@newlib@newlib_version@
28Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
29Source1:        ftp://sourceware.cygnus/com/pub/newlib/newlib-@newlib_version@.tar.gz
30Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
31Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
32Buildroot:      /tmp
33
34#
35# The original sources are not included in the source RPM.
36# If we included them, then the source RPMs for each target
37# would duplicate MBs of source unnecessarily.  This is
38# a duplication of over 30 MBs of source for each of
39# the more than 10 targets it is possible to build.
40#
41# You can get them yourself from the Internet and copy them to
42# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
43# Or you can try the ftp options of rpm :-)
44#
45NoSource:      0, 1
46
47%description
48RTEMS is an open source operating system for embedded systems.
49
50This is gcc's and newlib C Library's sources with patches for RTEMS.
51
52 The original sources are not included in the source RPM.
53 If we included them, then the source RPMs for each target
54 would duplicate MBs of source unnecessarily.  This is
55 a duplication of over 30 MBs of source for each of
56 the more than 10 targets it is possible to build.
57
58 You can get them yourself from the Internet and copy them to
59 your /usr/src/[redhat|packages]/SOURCES directory ($RPM_SOURCE_DIR).
60 Or you can try the ftp options of rpm :-)
61
62%prep
63# untar the sources inside @target_alias@-gcc-newlib
64%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
65
66%patch0 -p0
67%patch1 -p0
68
69  # Copy the C library into gcc's source tree
70  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
71  test -d build || mkdir build
72
73%build
74  cd build
75  ../gcc-@gcc_version@/configure --target=@target_alias@ \
76    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
77    --prefix=/opt/rtems
78
79  # for now we are building all the languages
80  #  '--enable-languages=c,c++'
81
82  make all
83  make info
84
85#  Since gcc now finds the RTEMS limits.h, this should not be needed
86#  cd gcc
87#    rm -f stmp-multilib
88#    find . -name "*.a" -print | xargs -e rm -f
89#
90#    make all
91#  cd ..
92
93%install
94  cd build
95  # Bug in gcc-2.95.1: It doesn't build this installation directory
96  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
97  ../gcc-@gcc_version@/mkinstalldirs \
98    $RPM_BUILD_ROOT/opt/rtems/@target_alias@/bin
99
100  make prefix=$RPM_BUILD_ROOT/opt/rtems install
101  cd @target_alias@/newlib
102  make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
103
104  # cd back to build/
105  cd ../..
106
107  # gzip info files
108  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
109  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
110  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
111
112  rm -f dirs ;
113  echo "%dir /opt/rtems/lib" >> dirs ;
114  echo "%dir /opt/rtems/lib/gcc-lib" >> dirs ;
115  echo "%dir /opt/rtems/lib/gcc-lib/@target_alias@" >> dirs ;
116
117  # Collect multilib subdirectories
118  TGTDIR="$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"
119  find $TGTDIR \
120    \( -type d -a ! -path "$TGTDIR/include*" \) -print | \
121    sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs
122
123  # Collect files to go into different packages
124  cp dirs files.chill
125  cp dirs files.gcc
126  cp dirs files.g77
127  cp dirs files.objc
128  cp dirs files.gcj
129
130  f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
131  for i in $f; do
132    case $i in
133    *chill*) echo "$i" >> files.chill ;;
134    *f771) ;;
135    *cc1obj) ;;
136    *libobjc*) echo "$i" >> files.objc ;;
137    *include/objc*) ;;
138    *jc1) ;;
139    *jvgenmain) ;;
140    *) echo "$i" >> files.gcc ;;
141    esac
142  done
143
144# ==============================================================
145# rtems-base-gcc
146# ==============================================================
147%package -n rtems-base-gcc
148Summary:      base package for rtems gcc and newlib C Library
149Group: rtems
150
151%description -n rtems-base-gcc
152
153RTEMS is an open source operating system for embedded systems.
154
155This is the files for gcc and newlib that are shared by all targets.
156
157%files -n rtems-base-gcc
158%dir /opt/rtems/info
159%doc /opt/rtems/info/cpp.info*.gz
160%doc /opt/rtems/info/gcc.info*.gz
161%doc /opt/rtems/info/libc.info*.gz
162%doc /opt/rtems/info/libm.info*.gz
163
164%dir /opt/rtems/bin
165/opt/rtems/bin/cpp@exe_ext@
166/opt/rtems/bin/gcov@exe_ext@
167
168%dir /opt/rtems/man
169%dir /opt/rtems/man/man1
170%doc /opt/rtems/man/man1/cccp.1
171
172%dir /opt/rtems/include
173/opt/rtems/include/g++-3
174
175%post -n rtems-base-gcc
176  if test -d $RPM_INSTALL_PREFIX/rtems/info;
177  then
178    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
179    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
180    test -n "$f" && for i in $f; do
181      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
182    done
183  fi
184
185%postun -n rtems-base-gcc
186  if test -d $RPM_INSTALL_PREFIX/rtems/info;
187  then
188    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
189    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
190    test -n "$f" && for i in $f; do
191      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
192    done
193  fi
194
195# ==============================================================
196# @target_alias@-gcc
197# ==============================================================
198%package -n @target_alias@-gcc
199Summary:      rtems gcc and newlib C Library for @target_alias@
200Group: rtems
201Requires: @target_alias@-binutils rtems-base-gcc
202
203%description -n @target_alias@-gcc
204RTEMS is an open source operating system for embedded systems.
205
206This is gcc and newlib C Library for @target_alias@.
207
208%files -n @target_alias@-gcc -f build/files.gcc
209%doc /opt/rtems/man/man1/@target_alias@-gcc.1
210%doc /opt/rtems/man/man1/@target_alias@-g++.1
211
212/opt/rtems/bin/@target_alias@-c++@exe_ext@
213/opt/rtems/bin/@target_alias@-g++@exe_ext@
214/opt/rtems/bin/@target_alias@-gcc@exe_ext@
215/opt/rtems/bin/@target_alias@-protoize@exe_ext@
216/opt/rtems/bin/@target_alias@-unprotoize@exe_ext@
217
218%dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
219
220/opt/rtems/@target_alias@
221
222# ==============================================================
223# rtems-base-chill
224# ==============================================================
225%package -n rtems-base-chill
226Summary:      base package for rtems gcc/chill compiler.
227Group: rtems
228Requires: rtems-base-gcc
229
230%description -n rtems-base-chill
231RTEMS is an open source operating system for embedded systems.
232
233This is the files for gcc/chill that are shared by all targets.
234
235%files -n rtems-base-chill
236%dir /opt/rtems/info
237%doc /opt/rtems/info/chill.info*.gz
238
239%post -n rtems-base-chill
240  if test -d $RPM_INSTALL_PREFIX/rtems/info;
241  then
242    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
243    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
244    test -n "$f" && for i in $f; do
245      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
246    done
247  fi
248
249%postun -n rtems-base-chill
250  if test -d $RPM_INSTALL_PREFIX/rtems/info;
251  then
252    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
253    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
254    test -n "$f" && for i in $f; do
255      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
256    done
257  fi
258
259# ==============================================================
260# @target_alias@-chill
261# ==============================================================
262%package -n @target_alias@-chill
263Summary:      gcc/chill compiler for @target_alias@
264Group: rtems
265Requires: rtems-base-chill @target_alias@-gcc
266
267%description -n @target_alias@-chill
268RTEMS is an open source operating system for embedded systems.
269
270This is the gcc/chill compiler and support files for @target_alias@
271
272%files -n @target_alias@-chill -f build/files.chill
273%dir /opt/rtems/bin
274/opt/rtems/bin/@target_alias@-chill
275
276# ==============================================================
277# rtems-base-gcj
278# ==============================================================
279%package -n rtems-base-gcj
280Summary:      base package for rtems gcc/java compiler (gcj).
281Group: rtems
282Requires: rtems-base-gcc
283
284%description -n rtems-base-gcj
285RTEMS is an open source operating system for embedded systems.
286
287This is the files for gcc/java (gcj) that are shared by all targets.
288
289%files -n rtems-base-gcj
290%dir /opt/rtems/bin
291/opt/rtems/bin/jcf-dump@exe_ext@
292/opt/rtems/bin/jv-scan@exe_ext@
293/opt/rtems/bin/gcjh@exe_ext@
294
295# ==============================================================
296# @target_alias@-gcj
297# ==============================================================
298%package -n @target_alias@-gcj
299Summary:      gcc/java compiler (gcj) for @target_alias@
300Group: rtems
301Requires: rtems-base-gcj @target_alias@-gcc
302
303%description -n @target_alias@-gcj
304RTEMS is an open source operating system for embedded systems.
305
306This is the gcc/java compiler for @target_alias@
307
308%files -n @target_alias@-gcj -f build/files.gcj
309%dir /opt/rtems/bin
310/opt/rtems/bin/@target_alias@-gcj@exe_ext@
311
312/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jc1
313/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jvgenmain
314
315# ==============================================================
316# rtems-base-g77
317# ==============================================================
318%package -n rtems-base-g77
319Summary:      rtems base package for gcc/g77 compiler
320Group: rtems
321Requires: rtems-base-gcc
322
323%description -n rtems-base-g77
324RTEMS is an open source operating system for embedded systems.
325
326This is the files for gcc/g77 that are shared by all targets.
327
328%files -n rtems-base-g77
329%dir /opt/rtems/info
330%doc /opt/rtems/info/g77.info*.gz
331
332%dir /opt/rtems/man
333%dir /opt/rtems/man/man1
334%doc /opt/rtems/man/man1/@target_alias@-g77.1
335
336%post -n rtems-base-g77
337  if test -d $RPM_INSTALL_PREFIX/rtems/info;
338  then
339    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
340    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
341    test -n "$f" && for i in $f; do
342      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
343    done
344  fi
345
346%postun -n rtems-base-g77
347  if test -d $RPM_INSTALL_PREFIX/rtems/info;
348  then
349    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
350    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
351    test -n "$f" && for i in $f; do
352      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
353    done
354  fi
355
356# ==============================================================
357# @target_alias@-g77
358# ==============================================================
359%package -n @target_alias@-g77
360Summary:      gcc/g77 compiler for @target_alias@
361Group: rtems
362Requires: rtems-base-g77 @target_alias@-gcc
363
364%description -n @target_alias@-g77
365RTEMS is an open source operating system for embedded systems.
366
367This is the gcc/g77 compiler for @target_alias@
368
369%files -n @target_alias@-g77 -f build/files.g77
370%dir /opt/rtems/bin
371/opt/rtems/bin/@target_alias@-g77@exe_ext@
372
373/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/f771@exe_ext@
374
375# ==============================================================
376# @target_alias@-objc
377# ==============================================================
378%package -n @target_alias@-objc
379Summary:      gcc/objc compiler for @target_alias@
380Group: rtems
381Requires: @target_alias@-gcc
382
383%description -n @target_alias@-objc
384RTEMS is an open source operating system for embedded systems.
385
386This is the gcc/objc compiler for @target_alias@
387
388%files -n @target_alias@-objc -f build/files.objc
389/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/cc1obj@exe_ext@
390/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include/objc
Note: See TracBrowser for help on using the repository browser.