I have a strange problem that I can't seem to solve.
I'm developing in C/assembly on an embedded ARM board with no FPU, and using GCC's soft floats.
Everything is compiled with -msoft-float
as a CFLAG
I'm trying to make an .a library in one directory and link with my kernel. When I do so, I get an error from ld:
ERROR: lib/libfoo.a(some.o) uses hardware FP, whereas bar.elf uses software FP
However, if I just give ld the .o file directly, (ie, skipping the ar step), it works fine. So I think I'm creating the .a archive wrong somehow. I'm using rcs as my $ARFLAGS, which as best I can tell is correct.
As a suitable workaround, I'm just feeding ld the .o files instead of .a, but I'd really like to know why this problem is happening, and how to correct it.
EDIT: Something suddently started working again. Still no idea what possibly went wrong here. Maybe there's a bug in ld, or in my makefile. Mysterious.