diff --git a/compiler/arm/agarmgas.pas b/compiler/arm/agarmgas.pas index f5cc0b1d1c..436da19e0f 100644 --- a/compiler/arm/agarmgas.pas +++ b/compiler/arm/agarmgas.pas @@ -49,6 +49,7 @@ unit agarmgas; TArmAppleGNUAssembler=class(TAppleGNUassembler) constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override; + function MakeCmdLine: TCmdStr; override; procedure WriteExtraHeader; override; end; @@ -160,6 +161,18 @@ unit agarmgas; end; + function TArmAppleGNUAssembler.MakeCmdLine: TCmdStr; + begin + result:=inherited MakeCmdLine; + if (asminfo^.id = as_clang) then + begin + if fputypestrllvm[current_settings.fputype] <> '' then + result:='-m'+fputypestrllvm[current_settings.fputype]+' '+result; + { Apple arm always uses softfp floating point ABI } + result:='-mfloat-abi=softfp '+result; + end; + end; + procedure TArmAppleGNUAssembler.WriteExtraHeader; begin inherited WriteExtraHeader; diff --git a/compiler/options.pas b/compiler/options.pas index a479658d9a..47ccab8913 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -4260,7 +4260,8 @@ begin end else begin - if not(FPUARM_HAS_VFP_EXTENSION in fpu_capabilities[init_settings.fputype]) then + if (not(FPUARM_HAS_VFP_EXTENSION in fpu_capabilities[init_settings.fputype])) + or (target_info.system = system_arm_darwin) then begin Message(option_illegal_fpu_eabihf); StopOptions(1);