how to use gcc with newlib?

Lewin A.R.W. Edwards
Thu Jun 14 05:52:00 GMT 2001

>/arm/lib/gcc-lib/arm-linux/2.95.3-2/../../../../arm-linux/bin/ld: cannot 
>open cr
>t1.o: No such file or directory
>collect2: ld returned 1 exit status
>I have compiled the arm toolchain with prefix=/arm and the newlib is also 
>installed with

How did you compile and install newlib? Is there a crt0.o existing in 
/arm/arm-linux/lib ? There is a several-step process to building a 
cross-compiler with newlib, did you follow it? The process is:

* configure, build and install binutils
* configure gcc and build + install C compiler ONLY
* configure, build and install newlib
* build + install remaining components of gcc
* optionally build + install gdb

It is tempting to short-circuit this process by building binutils, then 
building gcc in entirety, then building newlib. This won't work properly 
(at least, it never has done for me).

-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Tel (914) 937-4090 9am-6:30pm M-F ET

"Far better it is to dare mighty things, to win glorious triumphs, even 
though checkered by failure, than to rank with those poor spirits who 
neither enjoy much nor suffer much, because they live in the gray twilight 
that knows not victory nor defeat."
(Theodore Roosevelt)

More information about the Newlib mailing list