Fix compilation for arm-darwin using clang and forbid use of eabihf ABI for that target

git-svn-id: trunk@43205 -
This commit is contained in:
pierre 2019-10-15 22:17:52 +00:00
parent 1127e3d27b
commit 6f7a39adab
2 changed files with 15 additions and 1 deletions

View File

@ -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;

View File

@ -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);