This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Building newlib without -mhard-float


On 07 September 2007 17:19, Rick Mann wrote:

> On Sep 7, 2007, at 9:02 AM, Dave Korn wrote:

>>   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


  You shouldn't need to be adding '-lc -lm -lgcc' either.  And for next time
you have troubles debugging a link, add '-v' to your commandline to see what
the gcc driver *actually* ends up passing to the linker; that will give you
some guidelines as to what could be going wrong.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]