This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Building newlib without -mhard-float
"Dave Korn" <dave.korn@artimi.com> writes:
> 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.
He uses -nostdlib that results in the need to add them
manually. Probably the OP needs -nostartfiles instead.
-- Sergei.