[fpc-devel] error when crosscompile for arm

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 30 23:25:05 CET 2009


On 30 Nov 2009, at 23:14, Dariusz Mazur wrote:

> Jonas Maebe pisze:
>> On 30 Nov 2009, at 17:47, Dariusz Mazur wrote:
>> 
>>  
>>> I receive error while compile for arm
>>> selected processor does not support 'ldfd f0,[r11,#-48]'
>>>    
>> 
>> Add -Cfsoft to your compiler options to use softfloat instead of FPA.
>>  
> I've had this option enable

Please show a sample program that demonstrates this problem and the full command line that you used to compile it (and copy/paste the options that you used to compile the compiler/rtl).

>>> this is from simple function, but when I move them to main unit everything is compiled OK
>>> 
>>> what does it mean?
>> 
>> I don't know why it doesn't happen in that case.
>>  
> If units I have compiler directive $E- (emulation of FPU)

Is this still about moving the function to another unit solving the problem you had, or an unrelated remark?

> but when I remove it, i have problem with COMP type
> when
> var
>  c : comp;
> begin
>  c:=int(1.1);
> end;
> 
> it claim
> got Double, expected int64
> 
> second problem is with str
> 
> str(c:0:0,ss)
> is not valid

Comp is an x87-specific legacy type. On platforms without x87 support it is emulated using int64 (so there it is an integer type rather than a floating point type). You should not use the comp type if you want portable code.

I don't understand what this has to do with what I said above, or with your ldfd-problem though. Please do not reply to some sentences in a previous mail if you want to explain something else, it makes the discussion confusing. Either write a separate mail, or delete the unrelated sentences.


Jonas


More information about the fpc-devel mailing list