Can't build arm-elf cross compiler

David Korn
Wed Oct 31 03:22:00 GMT 2001

>-----Original Message-----
>From: hiroyuki matsumoto [ ]
>Sent: 31 October 2001 10:48

  I do not use ARM myself, but I see one or two errors:

>  PATH was set in the file of "Cygwin.bat" as follows.
> ...
>  SET PATH=/tools/arm-elf/bin:$PATH
>  SET PATH=/bin
> ...
>  and, after "Cygwin" had been started, typing later.
>  $ export PATH=$PATH:/tools/arm-elf/bin

  This is wrong: you should not add $prefix/$target/bin to your path, but

> The following errors occur at "gcc-make".
> "arm-elf-ar:not found"

  The files with prefixes 'arm-elf-' are placed in $prefix/bin; this
directory must be in your path, then all the different toolchains are
available at once by using the relevant prefix for the desired target.

> Then, the error was compulsorily excluded by setting PATH
> of the directory with "arm-elf-ar".
>  $ export PATH=$PATH:/tools/bin

  This bit is correct, although you would be better off with /tools/bin at
the beginning of the path rather than the end; that way if you install newer
upgraded versions of tools you already have in your base installation, the
shell will see the newest version first.

  Each different cross-compiler looks in $prefix/$target/bin for the 
other toolchain programs, where it expects to find them with no filename
prefix; this means that if you put /tools/arm-elf/bin at the beginning of
your path, when you type 'gcc' you will get the cross compiler instead of
the native compiler!! Then everything will go wrong.

>  $ cd /src/gcc-3.0.1
>  $ ln -s /src/newlib-1.9.0/newlib
> Is this link necessary?
> Is "libgloss" also necessary?
> Or, is neither necessary?

  They are both necessary; the gcc build does not know where on your system
you may have unpacked the newlib sources, so it looks for the links to the
headers for newlib in its own directory.  Using --with-newlib tells the
build process to expect to find these directories/links present.

  About the #defines and CFLAGS, I cannot help as I do not know ARM, but
you may be able to find help by searching the mailing list archive (go to and click on 'mailing lists' link, then look for
crossgcc and search there).

Burn your ID card!
Help support the campaign, copy this into your .sig!

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list