source: rtems/doc/started_ada/buildada.t @ fdd6a26

4.104.114.84.95
Last change on this file since fdd6a26 was fdd6a26, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 13, 1998 at 5:41:28 PM

Added Resources on the Internet section

  • Property mode set to 100644
File size: 9.6 KB
Line 
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
9@chapter Building the GNAT Cross Compiler Toolset
10
11This chapter describes the steps required to acquire the
12source code for a GNU cross compiler toolset, apply
13any required RTEMS specific patches, compile that
14toolset and install it.
15
16@section Directory Organization
17
18The tree structure in the figure below is assumed to be present in the
19following discussions:
20
21@center @b{XXX directory tree figure goes here}
22
23@section Get all the Pieces
24
25Gather the components that will be required for the installation and place
26them in an archive directory. Call this directory arc. Be sure that there
27is sufficient space to hold all necessary information. This will amount to
28approximately 20 megabytes.
29
30@subheading @value{GCC-VERSION}
31@example
32    FTP Site:    @value{GCC-FTPSITE}
33    Directory:   @value{GCC-FTPDIR}
34    File:        @value{GCC-TAR}
35@end example
36
37@subheading @value{GNAT-VERSION}
38@example
39    FTP Site:    @value{GNAT-FTPSITE}
40    Directory:   @value{GNAT-FTPDIR}
41    File:        @value{GNAT-TAR}
42@end example
43
44@subheading @value{BINUTILS-VERSION}
45@example
46    FTP Site:    @value{BINUTILS-FTPSITE}
47    Directory:   @value{BINUTILS-FTPDIR}
48    File:        @value{BINUTILS-TAR}
49@end example
50
51@subheading @value{NEWLIB-VERSION}
52@example
53    FTP Site:    @value{NEWLIB-FTPSITE}
54    Directory:   @value{NEWLIB-FTPDIR}
55    File:        @value{NEWLIB-TAR}
56@end example
57
58@subheading @value{RTEMS-VERSION}
59@example
60    FTP Site:    @value{RTEMS-FTPSITE}
61    Directory:   @value{RTEMS-FTPDIR}
62    File:        @value{RTEMS-TAR}
63    File:        bit_ada
64@ifset BINUTILS-RTEMSPATCH
65    File:        @value{BINUTILS-RTEMSPATCH}
66@end ifset
67@ifset NEWLIB-RTEMSPATCH
68    File:        @value{NEWLIB-RTEMSPATCH}
69@end ifset
70@ifset GCC-RTEMSPATCH
71    File:        @value{GCC-RTEMSPATCH}
72@end ifset
73@ifset GNAT-RTEMSPATCH
74    File:        @value{GNAT-RTEMSPATCH}
75@end ifset
76    File:        hello_world_ada.tgz
77@end example
78
79@section Create the tools Directory
80
81Create a directory called tools that will serve as a working directory to
82perform the build of the cross compiler tools.
83
84Unpack the compressed tar files using the following command sequence:
85
86@example
87cd tools
88tar xzf ../arc/@value{GCC-TAR}
89tar xzf ../arc/@value{GNAT-TAR}
90tar xzf ../arc/@value{BINUTILS-TAR}
91tar xzf ../arc/@value{NEWLIB-TAR}
92@end example
93
94After the compressed tar files have been unpacked, the following
95directories will have been created under tools.
96
97@itemize @bullet
98@item @value{BINUTILS-UNTAR}
99@item @value{GCC-UNTAR}
100@item @value{GNAT-UNTAR}
101@item @value{NEWLIB-UNTAR}
102@end itemize
103
104@c
105@c  GCC patches
106@c
107
108@section Apply RTEMS Patch to GCC
109
110@ifclear GCC-RTEMSPATCH
111No RTEMS specific patches are required for @value{GCC-VERSION} to
112support @value{RTEMS-VERSION}.
113@end ifclear
114
115@ifset GCC-RTEMSPATCH
116
117Apply the patch using the following command sequence:
118
119@example
120cd tools/@value{GCC-UNTAR}
121zcat arc/@value{GCC-RTEMSPATCH} | patch -p1
122@end example
123
124Check to see if any of these patches have been rejected using the following
125sequence:
126
127@example
128cd tools/@value{GCC-UNTAR}
129find . -name "*.rej" -print
130@end example
131
132If any files are found with the .rej extension, a patch has been rejected.
133This should not happen with a good patch file.
134
135To see the files that have been modified use the sequence:
136
137@example
138cd tools/@value{GCC-UNTAR}
139find . -name "*.orig" -print
140@end example
141
142The files that are found, have been modified by the patch file.
143
144@end ifset
145
146@c
147@c  BINUTILS patches
148@c
149
150@section Apply RTEMS Patch to binutils
151
152@ifclear BINUTILS-RTEMSPATCH
153No RTEMS specific patches are required for @value{BINUTILS-VERSION} to
154support @value{RTEMS-VERSION}.
155@end ifclear
156
157@ifset BINUTILS-RTEMSPATCH
158Apply the patch using the following command sequence:
159
160@example
161cd tools/@value{BINUTILS-UNTAR}
162zcat arc/@value{BINUTILS-RTEMSPATCH} | patch -p1
163@end example
164
165Check to see if any of these patches have been rejected using the following
166sequence:
167
168@example
169cd tools/@value{BINUTILS-UNTAR}
170find . -name "*.rej" -print
171@end example
172
173If any files are found with the .rej extension, a patch has been rejected.
174This should not happen with a good patch file.
175
176To see the files that have been modified use the sequence:
177
178@example
179cd tools/@value{BINUTILS-UNTAR}
180find . -name "*.orig" -print
181@end example
182
183The files that are found, have been modified by the patch file.
184
185@end ifset
186
187@c
188@c  Newlib patches
189@c
190
191@section Apply RTEMS Patch to newlib
192
193@ifclear NEWLIB-RTEMSPATCH
194No RTEMS specific patches are required for @value{NEWLIB-VERSION} to
195support @value{RTEMS-VERSION}.
196@end ifclear
197
198@ifset NEWLIB-RTEMSPATCH
199
200Apply the patch using the following command sequence:
201
202@example
203cd tools/@value{NEWLIB-UNTAR}
204zcat arc/@value{NEWLIB-RTEMSPATCH} | patch -p1
205@end example
206
207Check to see if any of these patches have been rejected using the following
208sequence:
209
210@example
211cd tools/@value{NEWLIB-UNTAR}
212find . -name "*.rej" -print
213@end example
214
215If any files are found with the .rej extension, a patch has been rejected.
216This should not happen with a good patch file.
217
218To see the files that have been modified use the sequence:
219
220@example
221cd tools/@value{NEWLIB-UNTAR}
222find . -name "*.orig" -print
223@end example
224
225The files that are found, have been modified by the patch file.
226
227@end ifset
228
229@c 
230@c  GNAT patches
231@c
232
233@section Apply RTEMS Patch to GNAT
234
235@ifclear GNAT-RTEMSPATCH
236No RTEMS specific patches are required for @value{GNAT-VERSION} to
237support @value{RTEMS-VERSION}.
238@end ifclear
239
240@ifset GNAT-RTEMSPATCH
241
242Apply the patch using the following command sequence:
243
244@example
245cd tools/@value{GNAT-UNTAR}
246zcat arc/@value{GNAT-RTEMSPATCH} | patch -p1
247@end example
248
249Check to see if any of these patches have been rejected using the following
250sequence:
251
252@example
253cd tools/@value{GNAT-UNTAR}
254find . -name "*.rej" -print
255@end example
256
257If any files are found with the .rej extension, a patch has been rejected.
258This should not happen with a good patch file.
259
260To see the files that have been modified use the sequence:
261
262@example
263cd tools/@value{GNAT-UNTAR}
264find . -name "*.orig" -print
265@end example
266
267The files that are found, have been modified by the patch file.
268
269@end ifset
270
271@c
272@c  Copy the ada directory
273@c
274
275
276@section Copy the ada Subdirectory to the GCC Source Tree
277
278Copy the ada subtree in the patched subtree of
279tools/@value{GNAT-UNTAR}/src to the
280tools/@value{GCC-UNTAR} directory:
281
282@example
283cd tools/@value{GNAT-UNTAR}/src
284cp -r ada ../../../@value{GCC-UNTAR}
285@end example
286
287@c
288@c  Modify the bit_ada script
289@c
290
291@section Modify the bit_ada Script
292
293Copy the @code{bit_ada} script from arc to the tools directory.
294
295Edit the @code{bit_ada} file to alter the following environmental variables:
296
297@itemize @bullet
298@item INSTALL_POINT
299@item BINUTILS
300@item NEWLIB
301@item GCC
302@item BUILD_DOCS
303@end itemize
304
305These variables are located in the script section that resembles the
306extract below:
307
308
309@example
310# USERCHANGE -- localize these.
311#
312#  INSTALL_POINT: Directory tools are installed into.
313#      Recommended installation point for various OS's:
314#         Linux:    /usr/local/rtems
315#         Solaris:  /opt/gnu/rtems
316#   BINUTILS:     Binutils source directory
317#   NEWLIB:       Newlib source directory
318#   GCC:          Newlib source directory
319#   BUILD_DOCS:   Set to "yes" if you want to install documentation.
320#
321BINUTILS=@value{BINUTILS-UNTAR}
322GCC=@value{GCC-UNTAR}
323NEWLIB=@value{NEWLIB-UNTAR}
324BUILD_DOCS=yes
325INSTALL_POINT=/home/joel/$@{GCC@}/$@{target@}
326
327# USERCHANGE - uncomment this if you want to watch the commands.
328@end example
329
330Where each of the variables which may be modified is described below:
331
332@table @code
333@item INSTALL_POINT
334is the location where you wish the GNU C/C++ cross compilation tools for
335RTEMS to be built. It is recommended that the directory chosen to receive
336these tools be named so that it is clear from which egcs distribution it
337was generated and for which target system the tools are to produce code for.
338
339@item BINUTILS
340is the directory under tools that contains @value{BINUTILS-UNTAR}.
341For example:
342
343@example
344BINUTILS=@value{BINUTILS-UNTAR}
345@end example
346
347@item GCC
348is the directory under tools that contains @value{GCC-UNTAR}.
349For example:
350
351@example
352GCC=@value{GCC-UNTAR}
353@end example
354
355@item NEWLIB
356is the directory under tools that contains @value{NEWLIB-UNTAR}.
357For example:
358
359@example
360NEWLIB=@value{NEWLIB-UNTAR}
361@end example
362
363@item BUILD_DOCS
364is set to "yes" if you want to install documentation.
365For example:
366
367@example
368BUILD_DOCS=yes
369@end example
370
371@end table
372
373@section Running the bit_ada Script
374
375After the @code{bit_ada} script has been modified to reflect the
376local installation, the modified @code{bit_ada} script is run
377using the following sequence:
378
379@example
380cd tools
381./bit_ada <target configuration>
382@end example
383
384Where <target configuration> is one of the following:
385
386@itemize @bullet
387@item hppa1.1
388@item i386
389@item i386-elf
390@item i386-go32
391@item i960
392@item m68k
393@item mips64orion
394@item powerpc
395@item sh
396@item sparc
397@end itemize
398
399NOTE:  The above list of target configurations is the list of RTEMS supported
400targets.  Only a subset of these have been tested with GNAT/RTEMS.  For more
401information, contact your GNAT/RTEMS representative.
402
403If no errors are encountered, the @code{bit_ada} script will conclude by
404printing messages similar to the following:
405
406@example
407
408The src and build-i386-tools subdirectory may now be removed.
409
410Started:  Fri Apr 10 10:14:07 CDT 1998
411Finished: Fri Apr 10 12:01:33 CDT 1998
412@end example
413
414If the @code{bit_ada} script successfully completes, then the
415GNU C/C++ cross compilation tools are installed.
416
417If the @code{bit_ada} script does not successfully complete, then investigation
418will be required to determine the source of the error.
419
Note: See TracBrowser for help on using the repository browser.