Building newlib without -mhard-float
Rick Mann
rmann@latencyzero.com
Fri Sep 7 16:22:00 GMT 2007
On Sep 7, 2007, at 9:02 AM, Dave Korn wrote:
> Linking is strictly in command line order. As it runs along the
> commandline
> it picks up undefined references; when it finds a new library or
> file it
> resolves any outstanding references *but* it doesn't memorize all
> the syms
> from that file and re-use them to fill in undefined references that
> turn up
> *later* on the command-line. See also the --start-group and --end-
> group
> options to ld.
Thanks for the explanation. Shortly after I sent that email I
realized that it must be doing this.
> However, the real underlying cause of the problem is that you're
> doing it
> wrong. Don't invoke ld directly. Use the gcc compiler driver, and
> it will
> automatically get all the startup files and libraries in the right
> places for
> you.
So, I am actually not calling ld directly. I was, but I finally
figured out how to call gcc and not have it throw a bunch of stuff in
the wrong places. I only started with ld because that's what various
examples I had started with. I now call:
arm-elf-gcc -Wl,-Map,mapfile.txt -mcpu=xscale -nostdlib -Wall -Wextra
-Wredundant-decls -pedantic -Wshadow -O2 -Xlinker --script=link.lds -
o h.elf obj/start.o obj/Util.o obj/glue.o obj/lcd.o obj/main.o -lc -
lm -lgcc
So, the order is still important.
--
Rick
More information about the Newlib
mailing list