source: rtems/doc/started_ada/buildada.t @ 50bd388

4.104.114.84.95
Last change on this file since 50bd388 was 50bd388, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/27/03 at 16:18:53

2003-08-27 Ralf Corsepius <corsepiu@…>

  • buildada.t, gdb.t, tversions.texi: Don't use VARIABLEs containing '-' in @set and @value (violates texi-syntax).
  • Property mode set to 100644
File size: 19.8 KB
RevLine 
[8e8676da]1@c
[6449498]2@c  COPYRIGHT (c) 1988-2002.
[8e8676da]3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
[6d3d425d]9@chapter Building the GNAT Cross Compiler Toolset
[8e8676da]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
[fffe9266]16@section Create the Archive and Build Directories
17
18Start by making the @code{archive} directory to contain the downloaded
19source code and the @code{tools} directory to be used as a build
20directory.  The command sequence to do this is shown
21below:
22
23@example
[75dfc7f7]24mkdir archive
[fffe9266]25mkdir tools
26@end example
27
28This will result in an initial directory structure similar to the
29one shown in the following figure:
30
31@example
32@group
[75dfc7f7]33/whatever/prefix/you/choose/
34        archive/
35        tools/
[fffe9266]36
37@end group
38@end example
39
[75dfc7f7]40@c @ifset use-html
41@c @html
42@c <IMG SRC="sfile12c.jpg" WIDTH=417 HEIGHT=178
43@c     ALT="Starting Directory Organization">
44@c @end html
45@c @end ifset
[fffe9266]46
[dff0a57c]47@section Get All the Pieces
[6d3d425d]48
[fffe9266]49This section lists the components of an RTEMS cross development system.
50Included are the locations of each component as well as any required RTEMS
51specific patches.
[8e8676da]52
[50bd388]53@subheading @value{GCCVERSION}
[8e8676da]54@example
[50bd388]55    FTP Site:    @value{GCCFTPSITE}
56    Directory:   @value{GCCFTPDIR}
57    File:        @value{GCCTAR}
[dff0a57c]58@ifset use-html
[50bd388]59@c    URL:         @uref{ftp://@value{GCCFTPSITE}@value{GCCFTPDIR}/@value{GCCTAR},Download @value{GCCVERSION}}
60    URL:         ftp://@value{GCCFTPSITE}@value{GCCFTPDIR}/@value{GCCTAR}
[dff0a57c]61@end ifset
[8e8676da]62@end example
63
[6d3d425d]64@subheading @value{GNAT-VERSION}
65@example
66    FTP Site:    @value{GNAT-FTPSITE}
67    Directory:   @value{GNAT-FTPDIR}
68    File:        @value{GNAT-TAR}
[dff0a57c]69@ifset use-html
[2898d39b]70@c    URL:         @uref{ ftp://@value{GNAT-FTPSITE}@value{GNAT-FTPDIR}/@value{GNAT-TAR}, Download @value{GNAT-VERSION}}
71    URL:         ftp://@value{GNAT-FTPSITE}@value{GNAT-FTPDIR}/@value{GNAT-TAR}
[dff0a57c]72@end ifset
[6d3d425d]73@end example
74
[50bd388]75@subheading @value{BINUTILSVERSION}
[8e8676da]76@example
[50bd388]77    FTP Site:    @value{BINUTILSFTPSITE}
78    Directory:   @value{BINUTILSFTPDIR}
79    File:        @value{BINUTILSTAR}
[dff0a57c]80@ifset use-html
[50bd388]81@c    URL:         @uref{ftp://@value{BINUTILSFTPSITE}@value{BINUTILSFTPDIR}/@value{BINUTILSTAR}, Download @value{BINUTILSVERSION}}
82    URL:         ftp://@value{BINUTILSFTPSITE}@value{BINUTILSFTPDIR}/@value{BINUTILSTAR}
[dff0a57c]83@end ifset
[8e8676da]84@end example
85
[50bd388]86@subheading @value{NEWLIBVERSION}
[8e8676da]87@example
[50bd388]88    FTP Site:    @value{NEWLIBFTPSITE}
89    Directory:   @value{NEWLIBFTPDIR}
90    File:        @value{NEWLIBTAR}
[dff0a57c]91@ifset use-html
[50bd388]92@c    URL:         @uref{ftp://@value{NEWLIBFTPSITE}@value{NEWLIBFTPDIR}/@value{NEWLIBTAR}, Download @value{NEWLIBVERSION}}
93    URL:         ftp://@value{NEWLIBFTPSITE}@value{NEWLIBFTPDIR}/@value{NEWLIBTAR}
[dff0a57c]94@end ifset
[8e8676da]95@end example
96
[50bd388]97@subheading @value{RTEMSVERSION}
[8e8676da]98@example
[50bd388]99    FTP Site:    @value{RTEMSFTPSITE}
100    Directory:   @value{RTEMSFTPDIR}
101    File:        @value{RTEMSTAR}
[dff0a57c]102@ifset use-html
[50bd388]103@c    URL:         @uref{ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}, Download RTEMS components}
104    URL:         ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}
[dff0a57c]105@end ifset
106@end example
107
108@subheading RTEMS Hello World
109@example
[50bd388]110    FTP Site:    @value{RTEMSFTPSITE}
111    Directory:   @value{RTEMSFTPDIR}
[fffe9266]112    File:        hello_world_ada.tgz
[dff0a57c]113@ifset use-html
[50bd388]114@c    URL:         @uref{ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}/ada_tools/hello_world_ada.tgz, Download RTEMS Hello World}
115    URL:         ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}/ada_tools/hello_world_ada.tgz
[dff0a57c]116@end ifset       
[fffe9266]117@end example
118
[dff0a57c]119@subheading RTEMS Specific Tool Patches and Scripts
[fffe9266]120@example
[50bd388]121    FTP Site:    @value{RTEMSFTPSITE}
122    Directory:   @value{RTEMSFTPDIR}/ada_tools/source
123    File:        @value{BUILDTOOLSTAR}
124@ifset BINUTILSRTEMSPATCH
125    File:        @value{BINUTILSRTEMSPATCH}
[6d3d425d]126@end ifset
[50bd388]127@ifset NEWLIBRTEMSPATCH
128    File:        @value{NEWLIBRTEMSPATCH}
[6d3d425d]129@end ifset
[50bd388]130@ifset GCCRTEMSPATCH
131    File:        @value{GCCRTEMSPATCH}
[6d3d425d]132@end ifset
133@ifset GNAT-RTEMSPATCH
134    File:        @value{GNAT-RTEMSPATCH}
135@end ifset
[dff0a57c]136@ifset use-html
[50bd388]137@c    URL:         @uref{ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}/ada_tools/source, Download RTEMS patches}
138    URL:         ftp://@value{RTEMSFTPSITE}@value{RTEMSFTPDIR}/ada_tools/source
[fffe9266]139@end ifset
140@end example
[4aa6b64]141
[6e3c36b7]142@section Unarchiving the Tools
[8e8676da]143
[4aa6b64]144While in the @code{tools} directory, unpack the compressed
145tar files using the following command sequence:
[8e8676da]146
147@example
148cd tools
[50bd388]149tar xzf ../archive/@value{GCCTAR}
[75dfc7f7]150tar xzf ../archive/@value{GNAT-TAR}
[50bd388]151tar xzf ../archive/@value{BINUTILSTAR}
152tar xzf ../archive/@value{NEWLIBTAR}
153tar xzf ../archive/@value{BUILDTOOLSTAR}
[8e8676da]154@end example
155
156After the compressed tar files have been unpacked, the following
157directories will have been created under tools.
158
159@itemize @bullet
[50bd388]160@item @value{BINUTILSUNTAR}
161@item @value{GCCUNTAR}
[6d3d425d]162@item @value{GNAT-UNTAR}
[50bd388]163@item @value{NEWLIBUNTAR}
[8e8676da]164@end itemize
165
[b7ea3ec]166There will also be a set of scripts in the current directory
167which aid in building the tools and RTEMS.  They are:
[a6aa8a91]168
[b7ea3ec]169@itemize @bullet
170@item bit_ada
171@item bit_gdb
172@item bit_rtems
173@item common.sh
174@item user.cfg
175@end itemize
[a6aa8a91]176
[b7ea3ec]177When the @code{bit_ada} script is executed later in this process,
[a6aa8a91]178it will automatically create two other subdirectories:
[6e3c36b7]179
180@itemize @bullet
181@item src
182@item build-$@{CPU@}-tools
183@end itemize
184
[b7ea3ec]185Similarly, the @code{bit_gdb} script will create the
186subdirectory @code{build-$@{CPU@}-gdb} and
187the @code{bit_rtems} script will create the
188subdirectory @code{build-$@{CPU@}-rtems}.
189
[a6aa8a91]190The directory tree should look something like the following figure:
[4aa6b64]191
192@example
193@group
[a6aa8a91]194/whatever/prefix/you/choose/
195        archive/
[50bd388]196            @value{GCCTAR}
[a6aa8a91]197            @value{GNAT-TAR}
[50bd388]198            @value{BINUTILSTAR}
199            @value{NEWLIBTAR}
200            @value{RTEMSTAR}
201            @value{BUILDTOOLSTAR}
202@ifset GCCRTEMSPATCH
203            @value{GCCRTEMSPATCH}
[4aa6b64]204@end ifset
[50bd388]205@ifset BINUTILSRTEMSPATCH
206            @value{BINUTILSRTEMSPATCH}
[a6aa8a91]207@end ifset
[50bd388]208@ifset NEWLIBRTEMSPATCH
209            @value{NEWLIBRTEMSPATCH}
[a6aa8a91]210@end ifset
211@ifset GNAT-RTEMSPATCH
212            @value{GNAT-RTEMSPATCH}
213@end ifset
[5d7eafe]214            hello_world_ada.tgz
215            bit_ada
[a6aa8a91]216        tools/
[50bd388]217            @value{BINUTILSUNTAR}/
218            @value{GCCUNTAR}/
[a6aa8a91]219            @value{GNAT-UNTAR}/
[50bd388]220            @value{NEWLIBUNTAR}/
[5d7eafe]221            bit_ada
[b7ea3ec]222            bit_gdb
223            bit_rtems
224            common.sh
225            user.cfg
[4aa6b64]226@end group
227@end example
228
[a6aa8a91]229@c @ifset use-html
230@c @html
231@c <IMG SRC="bit_ada.jpg" WIDTH=816 HEIGHT=267 ALT="Directory Organization">
232@c @end html
233@c @end ifset
[4aa6b64]234
[b7ea3ec]235@c
236@c  Host Specific Notes
237@c
238
239@section Host Specific Notes
240
241@subsection Solaris 2.x
242
243The build scripts are written in "shell".  The program @code{/bin/sh}
244on Solaris 2.x is not robust enough to execute these scripts.  If you
245are on a Solaris 2.x host, then change the first line of the files
246@code{bit_ada}, @code{bit_gdb}, and @code{bit_rtems} to use the
247@code{/bin/ksh} shell instead.
248
[513196f]249@c
250@c  Reading the Documentation
251@c
252
253@section Reading the Tools Documentation
254
255Each of the tools in the GNU development suite comes with documentation.
256It is in the reader's and tool maintainers' interest that one read the
257documentation before posting a problem to a mailing list or news group.
258
[4aa6b64]259
[8e8676da]260@c
[6d3d425d]261@c  GCC patches
[8e8676da]262@c
263
[6d3d425d]264@section Apply RTEMS Patch to GCC
[8e8676da]265
[50bd388]266@ifclear GCCRTEMSPATCH
267No RTEMS specific patches are required for @value{GCCVERSION} to
268support @value{RTEMSVERSION}.
[8e8676da]269@end ifclear
270
[50bd388]271@ifset GCCRTEMSPATCH
[8e8676da]272
273Apply the patch using the following command sequence:
274
275@example
[50bd388]276cd tools/@value{GCCUNTAR}
277zcat ../../archive/@value{GCCRTEMSPATCH} | patch -p1
[8e8676da]278@end example
279
280Check to see if any of these patches have been rejected using the following
281sequence:
282
283@example
[50bd388]284cd tools/@value{GCCUNTAR}
[8e8676da]285find . -name "*.rej" -print
286@end example
287
288If any files are found with the .rej extension, a patch has been rejected.
[b7ea3ec]289This should not happen with a good patch file which is properly applied.
[8e8676da]290
291@end ifset
292
293@c
294@c  BINUTILS patches
295@c
296
297@section Apply RTEMS Patch to binutils
298
[50bd388]299@ifclear BINUTILSRTEMSPATCH
300No RTEMS specific patches are required for @value{BINUTILSVERSION} to
301support @value{RTEMSVERSION}.
[8e8676da]302@end ifclear
303
[50bd388]304@ifset BINUTILSRTEMSPATCH
[8e8676da]305Apply the patch using the following command sequence:
306
307@example
[50bd388]308cd tools/@value{BINUTILSUNTAR}
309zcat ../../archive/@value{BINUTILSRTEMSPATCH} | patch -p1
[8e8676da]310@end example
311
312Check to see if any of these patches have been rejected using the following
313sequence:
314
315@example
[50bd388]316cd tools/@value{BINUTILSUNTAR}
[8e8676da]317find . -name "*.rej" -print
318@end example
319
320If any files are found with the .rej extension, a patch has been rejected.
[b7ea3ec]321This should not happen with a good patch file which is properly applied.
[8e8676da]322
323@end ifset
324
325@c
326@c  Newlib patches
327@c
328
329@section Apply RTEMS Patch to newlib
330
[50bd388]331@ifclear NEWLIBRTEMSPATCH
332No RTEMS specific patches are required for @value{NEWLIBVERSION} to
333support @value{RTEMSVERSION}.
[8e8676da]334@end ifclear
335
[50bd388]336@ifset NEWLIBRTEMSPATCH
[8e8676da]337
338Apply the patch using the following command sequence:
339
340@example
[50bd388]341cd tools/@value{NEWLIBUNTAR}
342zcat ../../archive/@value{NEWLIBRTEMSPATCH} | patch -p1
[8e8676da]343@end example
344
345Check to see if any of these patches have been rejected using the following
346sequence:
347
348@example
[50bd388]349cd tools/@value{NEWLIBUNTAR}
[8e8676da]350find . -name "*.rej" -print
351@end example
352
353If any files are found with the .rej extension, a patch has been rejected.
[b7ea3ec]354This should not happen with a good patch file which is properly applied.
[8e8676da]355
356@end ifset
357
[6d3d425d]358@c 
359@c  GNAT patches
[8e8676da]360@c
[6d3d425d]361
362@section Apply RTEMS Patch to GNAT
363
364@ifclear GNAT-RTEMSPATCH
365No RTEMS specific patches are required for @value{GNAT-VERSION} to
[50bd388]366support @value{RTEMSVERSION}.
[6d3d425d]367@end ifclear
368
369@ifset GNAT-RTEMSPATCH
370
371Apply the patch using the following command sequence:
372
373@example
374cd tools/@value{GNAT-UNTAR}
[5d7eafe]375zcat ../../archive/@value{GNAT-RTEMSPATCH} | patch -p1
[6d3d425d]376@end example
377
378Check to see if any of these patches have been rejected using the following
379sequence:
380
381@example
382cd tools/@value{GNAT-UNTAR}
383find . -name "*.rej" -print
384@end example
385
386If any files are found with the .rej extension, a patch has been rejected.
[b7ea3ec]387This should not happen with a good patch file which is properly applied.
[6d3d425d]388
389@end ifset
390
391@c
392@c  Copy the ada directory
393@c
394
395
396@section Copy the ada Subdirectory to the GCC Source Tree
397
398Copy the ada subtree in the patched subtree of
399tools/@value{GNAT-UNTAR}/src to the
[50bd388]400tools/@value{GCCUNTAR} directory:
[6d3d425d]401
402@example
403cd tools/@value{GNAT-UNTAR}/src
[50bd388]404cp -r ada ../../@value{GCCUNTAR}
[6d3d425d]405@end example
406
[adee5979]407
[6d3d425d]408@c
[b7ea3ec]409@c  Localizing the Configuration
[8e8676da]410@c
411
[b7ea3ec]412@section Localizing the Configuration
[8e8676da]413
[adee5979]414Edit the @code{user.cfg} file to alter the settings of various
[b7ea3ec]415variables which are used to tailor the build process.
416Each of the variables set in @code{user.cfg} may be modified
417as described below:
[8e8676da]418
419@table @code
420@item INSTALL_POINT
421is the location where you wish the GNU C/C++ cross compilation tools for
422RTEMS to be built. It is recommended that the directory chosen to receive
[0ab65474]423these tools be named so that it is clear from which gcc distribution it
[8e8676da]424was generated and for which target system the tools are to produce code for.
425
[adee5979]426@b{WARNING}: The @code{INSTALL_POINT} should not be a subdirectory
[5d7eafe]427under the build directory.  The build directory will be removed
428automatically upon successful completion of the build procedure.
429
[8e8676da]430@item BINUTILS
[50bd388]431is the directory under tools that contains @value{BINUTILSUNTAR}.
[fdd6a26]432For example:
[8e8676da]433
434@example
[50bd388]435BINUTILS=@value{BINUTILSUNTAR}
[8e8676da]436@end example
437
438@item GCC
[50bd388]439is the directory under tools that contains @value{GCCUNTAR}.
[b7ea3ec]440For example,
[8e8676da]441
442@example
[50bd388]443GCC=@value{GCCUNTAR}
[8e8676da]444@end example
445
[b7ea3ec]446Note that the gnat version is not needed because the gnat source
447is built as part of building gcc.
448
[8e8676da]449@item NEWLIB
[50bd388]450is the directory under tools that contains @value{NEWLIBUNTAR}.
[fdd6a26]451For example:
[8e8676da]452
453@example
[50bd388]454NEWLIB=@value{NEWLIBUNTAR}
[8e8676da]455@end example
456
457@item BUILD_DOCS
[adee5979]458is set to "yes" if you want to install documentation.  This requires
459that tools supporting documentation production be installed.  This
460currently is limited to the GNU texinfo package.
[fdd6a26]461For example:
[8e8676da]462
463@example
464BUILD_DOCS=yes
465@end example
466
[b7ea3ec]467@item BUILD_OTHER_LANGUAGES
468is set to "yes" if you want to build languages other than C and C++.  At
[adee5979]469the current time, the set of alternative languages includes Java, Fortran,
470and Objective-C.  These alternative languages do not always build cross.
471Hence this option defaults to "no".
472
[b7ea3ec]473For example:
474
475@example
476BUILD_OTHER_LANGUAGES=yes
477@end example
478
[adee5979]479@b{NOTE:} Based upon the version of the compiler being used, it may not
480be possible to build languages other than C and C++ cross.  In many cases,
481the language run-time support libraries are not "multilib'ed".  Thus the
482executable code in these libraries will be for the default compiler settings
483and not necessarily be correct for your CPU model.
484
[b7ea3ec]485@item RTEMS
[50bd388]486is the directory under tools that contails @value{RTEMSUNTAR}.
[b7ea3ec]487
488@item ENABLE_RTEMS_POSIX
489is set to "yes" if you want to enable the RTEMS POSIX API support.
490At this time, this feature is not supported by the UNIX ports of RTEMS
491and is forced to "no" for those targets.  This corresponds to the
492@code{configure} option @code{--enable-posix}.
493
494This must be enabled to support the GNAT/RTEMS run-time.
495
[adee5979]496@item ENABLE_RTEMS_ITRON
497is set to "yes" if you want to enable the RTEMS ITRON API support.
498At this time, this feature is not supported by the UNIX ports of RTEMS
499and is forced to "no" for those targets.  This corresponds to the
500@code{configure} option @code{--enable-itron}.
501
502@item ENABLE_RTEMS_MP
503is set to "yes" if you want to enable the RTEMS multiprocessing
504support.  This feature is not supported by all RTEMS BSPs and
505is automatically forced to "no" for those BSPs.  This corresponds to the
506@code{configure} option @code{--enable-multiprocessing}.
507
508@item ENABLE_RTEMS_CXX
509is set to "yes" if you want to build the RTEMS C++ support including
510the C++ Wrapper for the Classic API.  This corresponds to the
511@code{configure} option @code{--enable-cxx}.
512
[b7ea3ec]513@item ENABLE_RTEMS_TESTS
514is set to "yes" if you want to build the RTEMS Test Suite.  If this
[adee5979]515is set to "no", then only the Sample Tests will be built.  Setting
516this option to "yes" significantly increases the amount of disk
517space required to build RTEMS.
[b7ea3ec]518This corresponds to the @code{configure} option @code{--enable-tests}.
519
520@item ENABLE_RTEMS_TCPIP
521is set to "yes" if you want to build the RTEMS TCP/IP Stack.  If a
522particular BSP does not support TCP/IP, then this feature is automatically
523disabled.  This corresponds to the @code{configure} option
524@code{--enable-tcpip}.
525
[adee5979]526@item ENABLE_RTEMS_NONDEBUG
527is set to "yes" if you want to build RTEMS in a fully optimized
528state.  This corresponds to executing @code{make} after configuring
529the source tree.
530
531@item ENABLE_RTEMS_DEBUG
532is set to "yes" if you want to build RTEMS in a debug version.
533When built for debug, RTEMS will include run-time code to
534perform consistency checks such as heap consistency checks.
535Although the precise compilation arguments are BSP dependent,
536the debug version of RTEMS is usually built at a lower optimization
537level.  This is usually done to reduce inlining which can make
538tracing code execution difficult.  This corresponds to executing
539@code{make VARIANT=debug} after configuring
540the source tree.
541
542@item INSTALL_RTEMS
543is set to "yes" if you want to install RTEMS after building it.
544This corresponds to executing @code{make install} after configuring
545and building the source tree.
546
547@item ENABLE_RTEMS_MAINTAINER_MODE
548is set to "yes" if you want to enabled maintainer mode functionality
549in the RTEMS Makefile.  This is disabled by default and it is not
550expected that most users will want to enable this.  When this option
551is enabled, the build process may attempt to regenerate files that
552require tools not required when this option is disabled.
553This corresponds to the @code{configure} option
554@code{--enable-maintainer-mode}.
555
[8e8676da]556@end table
557
[6d3d425d]558@section Running the bit_ada Script
[8e8676da]559
[6d3d425d]560After the @code{bit_ada} script has been modified to reflect the
561local installation, the modified @code{bit_ada} script is run
[8e8676da]562using the following sequence:
563
564@example
565cd tools
[6d3d425d]566./bit_ada <target configuration>
[8e8676da]567@end example
568
569Where <target configuration> is one of the following:
570
571@itemize @bullet
572@item hppa1.1
573@item i386
574@item i386-elf
575@item i386-go32
576@item i960
577@item m68k
578@item mips64orion
579@item powerpc
580@item sh
581@item sparc
582@end itemize
583
[6d3d425d]584NOTE:  The above list of target configurations is the list of RTEMS supported
585targets.  Only a subset of these have been tested with GNAT/RTEMS.  For more
586information, contact your GNAT/RTEMS representative.
587
[adee5979]588The build process can take a while to complete.  Many users find it
589handy to run the build process in the background, capture the output
590in a file, and monitor the output.  This can be done as follows:
591
592@example
593./bit_ada <target configuration> >bit.log 2>&1 &
594tail -f bit.log
595@end example
596
[6d3d425d]597If no errors are encountered, the @code{bit_ada} script will conclude by
[8e8676da]598printing messages similar to the following:
599
600@example
601
602The src and build-i386-tools subdirectory may now be removed.
603
604Started:  Fri Apr 10 10:14:07 CDT 1998
605Finished: Fri Apr 10 12:01:33 CDT 1998
606@end example
607
[6d3d425d]608If the @code{bit_ada} script successfully completes, then the
[8e8676da]609GNU C/C++ cross compilation tools are installed.
610
[6d3d425d]611If the @code{bit_ada} script does not successfully complete, then investigation
[8e8676da]612will be required to determine the source of the error.
613
[6449498]614@c
615@c Common Problems
616@c
617
618@section Common Problems
619
620@subsection Error Message Indicates Invalid Option to Assembler
621
622If a message like this is printed then the new cross compiler
623is most likely using the native assembler instead of the cross
624assembler or vice-versa (native compiler using new cross assembler).
625This can occur for one of the following reasons:
626
627@itemize @bullet
628
629@item Binutils Patch Improperly Applied
630@item Binutils Not Built
631@item Current Directory is in Your PATH
632
633@end itemize
634
635If you are using binutils 2.9.1 or newer with certain older versions of
636gcc, they do not agree on what the name of the newly
637generated cross assembler is.  Older binutils called it @code{as.new}
638which became @code{as.new.exe} under Windows.  This is not a valid
639file name, so @code{as.new} is now called @code{as-new}.  By using the latest
640released tool versions and RTEMS patches, this problem will be avoided.
641
642If binutils did not successfully build the cross assembler, then
643the new cross gcc (@code{xgcc}) used to build the libraries can not
644find it.  Make sure the build of the binutils succeeded.
645
646If you include the current directory in your PATH, then there
647is a chance that the native compiler will accidentally use
648the new cross assembler instead of the native one.  This usually
649indicates that "." is before the standard system directories
650in your PATH.  As a general rule, including "." in your PATH
651is a security risk and should be avoided.  Remove "." from
652your PATH.
653
654NOTE:  In some environments, it may be difficult to remove "."
655completely from your PATH.  In this case, make sure that "."
656is after the system directories containing "as" and "ld".
657
658@subsection Error Messages Indicating Configuration Problems
659
660If you see error messages like the following,
661
662@itemize @bullet
663
664@item cannot configure libiberty
665@item coff-emulation not found
666@item etc.
667
668@end itemize
669
670Then it is likely that one or more of your gnu tools is
671already configured locally in its source tree.  You can check
672for this by searching for the @code{config.status} file
673in the various tool source trees.  The following command
674does this for the binutils source:
675
676@example
[50bd388]677find @value{BINUTILSUNTAR} -name config.status -print
[6449498]678@end example
679
680The solution for this is to execute the command
681@code{make distclean} in each of the GNU tools
682root source directory.  This should remove all
683generated files including Makefiles.
684
685This situation usually occurs when you have previously
686built the tool source for some non-RTEMS target.  The
687generated configuration specific files are still in
688the source tree and the include path specified during
689the RTEMS build accidentally picks up the previous
690configuration.  The include path used is something like
691this:
692
693@example
[50bd388]694-I../../@value{BINUTILSUNTAR}/gcc -I/@value{BINUTILSUNTAR}/gcc/include -I.
[6449498]695@end example
696
697Note that the tool source directory is searched before the
698build directory.
699
700This situation can be avoided entirely by never using
701the source tree as the build directory -- even for
702
Note: See TracBrowser for help on using the repository browser.