OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts/] [gccnewlib/] [gccnewlib.add] - Blame information for rev 552

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.