source: rtems/doc/started/buildc.t @ 6113b3a

4.104.114.84.95
Last change on this file since 6113b3a was 6113b3a, checked in by Joel Sherrill <joel.sherrill@…>, on 04/09/98 at 19:43:18

Now builds clean for info, html, and ps.

  • Property mode set to 100644
File size: 5.2 KB
RevLine 
[417fcc73]1@c
2@c  COPYRIGHT (c) 1988-1998.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
[6113b3a]9@chapter Building the GNU C/C++ Cross Compiler Toolset
10
11@section Get all the pieces
12
13The tree structure in the figure below is assumed to be present in the
14following discussions:
15
16Gather the components that will be required for the installation and place
17them in an archive directory. Call this directory arc. Be sure that there
18is sufficient space to hold all necessary information. This will amount to
19approximately 20 megabytes.
20
21@example
22egcs 1.0.2
23    FTP Site:    egcs.cygnus.com
24    Directory:   /pub/egcs/releases/egcs-1.0.2
25    File:        egcs-1.0.2-980309-prerelease.tar.gz
26
27binutils 2.8.1
28    FTP Site:    ftp.gnu.org
29    Directory:   /pub/gnu
30    File:        binutils-2.8.1.tar.gz
31
32newlib 1.8.0
33    FTP Site:    ftp.cygnus.com
34    Directory:   /pub/newlib
35    File:        newlib-1.8.0.tar.gz
36
37RTEMS @value{version}
38FTP Site:        ftp.oarcorp.com
39    Directory:   /oarcorp/private/snapshots
40    File:        rtems-980219.tgz
41    File:        bit
42    File:        binutils-2.8.1-rtems-diff-971221.gz
43    File:        newlib-1.8.0-diff.980120.gz
44    File:        simple_app.tgz
45@end example
46
47
48@section Create the tools directory
[417fcc73]49
[6113b3a]50Create a directory called tools that will serve as a working directory to
51perform the build of the cross compiler tools.
[417fcc73]52
[6113b3a]53Unpack the compressed tar files using the following command sequence:
[417fcc73]54
55@example
56cd tools
[6113b3a]57tar xzf ../arc/egcs-1.0.2-980309-prerelease.tar.gz
58tar xzf ../arc/binutls-2.8.1.tar.gz
59tar xzf ../arc/newlib-1.8.0.tar.gz
[417fcc73]60@end example
61
[6113b3a]62After the compressed tar files have been unpacked, the following
63directories will have been created under tools.
64
65@itemize @bullet
66@item binutils-2.8.1
67@item egcs-1.0.2
68@item newlib-1.8.0
69@end itemize
70
71@section Apply patches for newlib
[417fcc73]72
[6113b3a]73Apply the patches using the following command sequence:
[417fcc73]74
75@example
[6113b3a]76cd tools/newlib-1.8.0
77zcat arc/newlib-1.8.0-diff.980120.gz|patch -p1
[417fcc73]78@end example
79
[6113b3a]80Check to see if any of these patches have been rejected using the following
81sequence:
82
83@example
84cd tools/newlib-1.8.0
85find . -name "*.rej" -print
86@end example
[417fcc73]87
[6113b3a]88If any files are found with the .rej extension, a patch has been rejected.
89This should not happen with a good patch file.
90
91To see the files that have been modified use the sequence:
[417fcc73]92
93@example
[6113b3a]94cd tools/newlib-1.8.0
95find . -name "*.orig" -print
[417fcc73]96@end example
97
[6113b3a]98The files that are found, have been modified by the patch file.
99
100
101@section Apply patches for binutils
102
103Apply the patches using the following command sequence:
104
105@example
106cd tools/binutils-2.8.1
107zcat arc/binutils-2.8.1-rtems-diff-971221.gz|patch -p1
108@end example
109
110Check to see if any of these patches have been rejected using the following
111sequence:
112
113@example
114cd tools/binutils-2.8.1
115find . -name "*.rej" -print
116@end example
117
118If any files are found with the .rej extension, a patch has been rejected.
119This should not happen with a good patch file.
120
121To see the files that have been modified use the sequence:
[417fcc73]122
123@example
[6113b3a]124cd tools/binutils-2.8.1
125find . -name "*.orig" -print
[417fcc73]126@end example
127
[6113b3a]128The files that are found, have been modified by the patch file.
129
130@section Modify the bit script
131
132Copy the bit file from arc to the tools directory.
133
134Edit the bit file to alter the following environmental variables:
135
136@itemize @bullet
137@item INSTALL_POINT
138@item BINUTILS
139@item NEWLIB
140@item GCC
141@item BUILD_DOCS
142@end itemize
143
144These variables are located in the script section that resembles the
145extract below:
146
147
148@example
149# USERCHANGE -- localize these.
150#
151#  INSTALL_POINT: Directory tools are installed into.
152#      Recommended installation point for various OS's:
153#         Linux:    /usr/local/rtems
154#         Solaris:  /opt/gnu/rtems
155#   BINUTILS:     Binutils source directory
156#   NEWLIB:       Newlib source directory
157#   GCC:          Newlib source directory
158#   BUILD_DOCS:   Set to "yes" if you want to install documentation.
159#
160BINUTILS=gas-971208
161GCC=egcs-1.0.1
162NEWLIB=newlib-1.8.0
163BUILD_DOCS=yes
164INSTALL_POINT=/home/joel/$@{GCC@}/$@{target@}
165
166# USERCHANGE - uncomment this if you want to watch the commands.
167@end example
168
169
[417fcc73]170Where:
171
[6113b3a]172@table @code
173@item INSTALL_POINT
174is the location where you wish the GNU C/C++ cross compilation tools for
175RTEMS to be built. It is recommended that the directory chosen to receive
176these tools be named so that it is clear from which egcs distribution it
177was generated and for which target system the tools are to produce code for.
178
179@item BINUTILS
180is the directory under tools that contains binutils-2.8.1.
181BINUTILS=binutils-2.8.1
182
183@item GCC
184is the directory under tools that contains egcs-1.0.1.
185GCC=egcs-1.0.2-980309-prerelease
[417fcc73]186
[6113b3a]187@item NEWLIB
188is the directory under tools that contains newlib-1.8.0.
189NEWLIB=newlib-1.8.0
[417fcc73]190
[6113b3a]191@item BUILD_DOCS
192is set to "yes" if you want to install documentation.
193BUILD_DOCS=yes
194
195@end table
196
197@section Running the bit script
198
199Run the modified bit script using the following sequence:
200
201@example
202cd tools
203./bit <target configuration>
204@end example
205
206Where:
207
208<target configuration> is one of the following:
209
210@example
211hppa1.1
212i386
213i386-elf
214i386-go32
215i960
216m68k
217mips64orion
218powerpc
219sh
220sparc
221@end example
[417fcc73]222
[6113b3a]223@section GNU C/C++ cross compiler toolset complete
224 
225At this point the GNU C/C++ cross compile tools should be built.
[417fcc73]226
Note: See TracBrowser for help on using the repository browser.