mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
Add -msoft-float or -mhard-float option to GNU assembler calls
This commit is contained in:
parent
77c51bf7e2
commit
e8c6274915
@ -57,6 +57,25 @@ unit cpugas;
|
|||||||
globals, verbose, itcpugas, cgbase, cgutils;
|
globals, verbose, itcpugas, cgbase, cgutils;
|
||||||
|
|
||||||
|
|
||||||
|
{ float related options as accepted by
|
||||||
|
GNU assembler in -mXXXX option:
|
||||||
|
-mhard-float allow floating-point instructions
|
||||||
|
-msoft-float do not allow floating-point instructions
|
||||||
|
-msingle-float only allow 32-bit floating-point operations
|
||||||
|
-mdouble-float allow 32-bit and 64-bit floating-point operations
|
||||||
|
}
|
||||||
|
function gas_float_option(fputype : tfputype) : string;
|
||||||
|
begin
|
||||||
|
case fputype of
|
||||||
|
fpu_none:
|
||||||
|
result:='';
|
||||||
|
fpu_soft:
|
||||||
|
result:='-msoft-float';
|
||||||
|
else
|
||||||
|
result:='-mhard-float';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ abi strings as accepted by
|
{ abi strings as accepted by
|
||||||
GNU assembler in -abi=XXX option }
|
GNU assembler in -abi=XXX option }
|
||||||
function gas_abitype(abi : tabi) : string;
|
function gas_abitype(abi : tabi) : string;
|
||||||
@ -104,6 +123,8 @@ unit cpugas;
|
|||||||
result := Inherited MakeCmdLine;
|
result := Inherited MakeCmdLine;
|
||||||
{ ABI selection }
|
{ ABI selection }
|
||||||
Replace(result,'$ABI','-mabi='+gas_abitype(target_info.abi));
|
Replace(result,'$ABI','-mabi='+gas_abitype(target_info.abi));
|
||||||
|
{ float selection }
|
||||||
|
Replace(result,'$FLOATABI',gas_float_option(current_settings.fputype));
|
||||||
{ ARCH selection }
|
{ ARCH selection }
|
||||||
Replace(result,'$ARCH','-march='+lower(cputypestr[current_settings.cputype]));
|
Replace(result,'$ARCH','-march='+lower(cputypestr[current_settings.cputype]));
|
||||||
// Replace(result,'$ARCH','-march=pic32mx -mtune=pic32mx');
|
// Replace(result,'$ARCH','-march=pic32mx -mtune=pic32mx');
|
||||||
@ -279,7 +300,7 @@ unit cpugas;
|
|||||||
id: as_gas;
|
id: as_gas;
|
||||||
idtxt: 'AS';
|
idtxt: 'AS';
|
||||||
asmbin: 'as';
|
asmbin: 'as';
|
||||||
asmcmd: '$ABI $ARCH $NOWARN -EL $PIC -o $OBJ $EXTRAOPT $ASM';
|
asmcmd: '$ABI $FLOATABI $ARCH $NOWARN -EL $PIC -o $OBJ $EXTRAOPT $ASM';
|
||||||
supported_targets: [system_mipsel_linux,system_mipsel_android,system_mipsel_embedded,system_mipsel_ps1];
|
supported_targets: [system_mipsel_linux,system_mipsel_android,system_mipsel_embedded,system_mipsel_ps1];
|
||||||
flags: [ af_needar, af_smartlink_sections];
|
flags: [ af_needar, af_smartlink_sections];
|
||||||
labelprefix: '.L';
|
labelprefix: '.L';
|
||||||
@ -293,7 +314,7 @@ unit cpugas;
|
|||||||
id: as_gas;
|
id: as_gas;
|
||||||
idtxt: 'AS';
|
idtxt: 'AS';
|
||||||
asmbin: 'as';
|
asmbin: 'as';
|
||||||
asmcmd: '$ABI $ARCH $NOWARN -EB $PIC -o $OBJ $EXTRAOPT $ASM';
|
asmcmd: '$ABI $FLOATABI $ARCH $NOWARN -EB $PIC -o $OBJ $EXTRAOPT $ASM';
|
||||||
supported_targets: [system_mipseb_linux];
|
supported_targets: [system_mipseb_linux];
|
||||||
flags: [ af_needar, af_smartlink_sections];
|
flags: [ af_needar, af_smartlink_sections];
|
||||||
labelprefix: '.L';
|
labelprefix: '.L';
|
||||||
|
Loading…
Reference in New Issue
Block a user