Friday, 11 September 2015

Re: [gccsdk] How to get hardware vfp with GCC?

On 11/09/15 18:41, Gavin Wraith wrote:
>> Does specifying -fpu=SoftVFP to asasm when building sys.o not fix
>> the problem?
>
> Alas no. It gives:
>
> error: sys.o uses FPA instructions, whereas so.riscos does not
> error: sys.o uses hardware FP, whereas so.riscos uses software FP

Having looked at asasm's README file, I see that VFP/NEON is still on
the ToDo list. Of course, you don't actually need the instructions,
but setting the relevant flags is probably missing too.

> Would gas be a better bet than asasm?

I think this is probably your best option. I don't know how complex
sys.s is, but conversion to GAS format usually only gets awkward when
macros and/or loop directives are involved.

> Is there no way of making the
> FPA flags of sys.o match those of so.riscos? After all, linking
> stuff that is totally free of FP instructions must be quite
> a common situation. It feels as if one is wrestling with some
> bureaucracy out of Kafka.
> Are there any docs on where Elf files keep their FPA flags?

The flags are stored in the ELF header as a 32 bit word at offset
0x24 from the start of the ELF file, where EF_ARM_VFP_FLOAT is defined
as 0x400 and EF_ARM_SOFT_FLOAT is defined as 0x200. You can read the
header using "readelf -e".
For VFP, you'll see a line like:

Flags: 0x600, GNU EABI, software FP, VFP

and for a normal build:

Flags: 0x200, GNU EABI, software FP

I think for FPA, the flags are 0.
I'm not aware of a tool that allows you to manipulate them though.

Lee.


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment