Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ARM FP compilation

Name: Anonymous 2010-05-19 10:56

I've been trying to compile a program that uses a library built with hardware floating-point.
It tells me that I've compiled the main program with software FP, but on each module that comprises it (as well as the program itself) I have explicitly said "use hardware FP please" (-mhard-float, see http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html). If you want, here is the compiler output (non-important stuff truncated for readability):

arm-gcc -Wall -Wextra -mhard-float -I. -I/opt/arm/include -c main.c -o main.o
arm-gcc -Wall -Wextra -mhard-float -I. -I/opt/arm/include -c touchscreen.c -o touchscreen.o
arm-gcc -Wall -Wextra -mhard-float -I. -I/opt/arm/include -c buttons.c -o buttons.o
arm-gcc -L. -L/opt/arm/lib -lts -mhard-float main.o touchscreen.o buttons.o -o touchscreen-test
/opt/arm/bin/arm-ld: ERROR: /opt/arm/lib/libts.so uses hardware FP, whereas touchscreen-test uses software FP
/opt/arm/bin/arm-ld: failed to merge target specific data of file /opt/arm/lib/libts.so
/opt/arm/bin/arm-ld: ERROR: main.o uses hardware FP, whereas touchscreen-test uses software FP
/opt/arm/bin/arm-ld: failed to merge target specific data of file main.o
/opt/arm/bin/arm-ld: ERROR: touchscreen.o uses hardware FP, whereas touchscreen-test uses software FP
/opt/arm/bin/arm-ld: failed to merge target specific data of file touchscreen.o
/opt/arm/bin/arm-ld: ERROR: buttons.o uses hardware FP, whereas touchscreen-test uses software FP
/opt/arm/bin/arm-ld: failed to merge target specific data of file buttons.o
collect2: ld returned 1 exit status
make: *** [touchscreen-test] Error 1


Where am I supposed to tell it to make touchscreen-test with hardware FP? It seems to ignore when I tell it to, even though I read somewhere that hardware is the default.

Name: Anonymous 2010-05-19 15:25

Update
Instead of fighting with the hard-float library, I found the source and let gcc handle the float-abi itself. It compiles, but I haven't tried running it yet.
No matter what I told it to do, it always compiled using hard-float but linked the final executable using soft-float (even when using the same flags for both). I have no idea why.


>>9 It's the GP2X Wiz, half-sibling to the Pandora console that /g/ masturbated over before it came out. I'm pretty sure it has no FPU, but using hard-float means that it will try to use hardware, and if that isn't there just use software instead, so there's no real reason to specify software FP.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List