Targetting the raspberry pi, what triple/flags should I set?
I tried triple: armv4t-unknown-linux-gnueabi and ld fails with:
a.out uses VFP register arguments
if i set hardfloat (using optdata.FloatABIType = FloatABI::Hard), ld fails with an assertion:
2.22 assertion fail ../../bfd/elf32-arm.c:11477
what am I missing?
It depends, of course, what operating system you have installed on the RPi, but given that it's an ARM1176JZFS (ARMv6) chip, I would expect to see armv6, not armv4t, in the CPU part of the triple. It has a VFP unit, so I'd assume that you'd want to set hardfp (unless you installed an OS that doesn't support hardfp in its standard library), but if ld is complaining then you almost certainly have a mismatch.
David
Op 30-12-2012 11:57, David Chisnall schreef:
It depends, of course, what operating system you have installed on
the
RPi, but given that it's an ARM1176JZFS (ARMv6) chip, I would expect to
see armv6, not armv4t, in the CPU part of the triple. It has a VFP unit,
so I'd assume that you'd want to set hardfp (unless you installed an OS
that doesn't support hardfp in its standard library), but if ld is
complaining then you almost certainly have a mismatch.
The folks on irc just helped me. The triple that works for Raspbian (with hard floats):
armv6-unknown-linux-gnueabi
I passed the following in the cpu:
arm1176jzf-s
and manually set hard-float, then ld worked (I didn't test floats, but i'm presuming that works). Thanks for the help,
Carlo Kok