* set reasonable defaults for arm eabi

git-svn-id: trunk@47530 -
This commit is contained in:
florian 2020-11-22 19:47:12 +00:00
parent 10911173df
commit 7ad8f94ec4

View File

@ -4387,44 +4387,61 @@ begin
; ;
end; end;
{ ARMHF defaults } { set ABI defaults }
if (target_info.abi = abi_eabihf) then case target_info.abi of
{ set default cpu type to ARMv7a for ARMHF unless specified otherwise } abi_eabihf:
begin { set default cpu type to ARMv7a for ARMHF unless specified otherwise }
{$ifdef CPUARMV6} begin
{ if the compiler is built for armv6, then {$ifdef CPUARMV6}
inherit this setting, e.g. Raspian is armhf but { if the compiler is built for armv6, then
only armv6, this makes rebuilds of the compiler inherit this setting, e.g. Raspian is armhf but
easier } only armv6, this makes rebuilds of the compiler
if not option.CPUSetExplicitly then easier }
init_settings.cputype:=cpu_armv6; if not option.CPUSetExplicitly then
if not option.OptCPUSetExplicitly then init_settings.cputype:=cpu_armv6;
init_settings.optimizecputype:=cpu_armv6; if not option.OptCPUSetExplicitly then
{$else CPUARMV6} init_settings.optimizecputype:=cpu_armv6;
if not option.CPUSetExplicitly then {$else CPUARMV6}
init_settings.cputype:=cpu_armv7a; if not option.CPUSetExplicitly then
if not option.OptCPUSetExplicitly then init_settings.cputype:=cpu_armv7a;
init_settings.optimizecputype:=cpu_armv7a; if not option.OptCPUSetExplicitly then
{$endif CPUARMV6} init_settings.optimizecputype:=cpu_armv7a;
{$endif CPUARMV6}
{ Set FPU type } { Set FPU type }
if not(option.FPUSetExplicitly) then if not(option.FPUSetExplicitly) then
begin begin
if init_settings.cputype < cpu_armv7 then if init_settings.cputype < cpu_armv7 then
init_settings.fputype:=fpu_vfpv2 init_settings.fputype:=fpu_vfpv2
else else
init_settings.fputype:=fpu_vfpv3_d16; init_settings.fputype:=fpu_vfpv3_d16;
end end
else else
begin begin
if (not(FPUARM_HAS_VFP_EXTENSION in fpu_capabilities[init_settings.fputype])) if (not(FPUARM_HAS_VFP_EXTENSION in fpu_capabilities[init_settings.fputype]))
or (target_info.system = system_arm_ios) then or (target_info.system = system_arm_ios) then
begin begin
Message(option_illegal_fpu_eabihf); Message(option_illegal_fpu_eabihf);
StopOptions(1); StopOptions(1);
end; end;
end; end;
end; end;
abi_eabi:
begin
if target_info.system=system_arm_linux then
begin
{ this is what Debian uses }
if not option.CPUSetExplicitly then
init_settings.cputype:=cpu_armv4t;
if not option.OptCPUSetExplicitly then
init_settings.optimizecputype:=cpu_armv4t;
if not(option.FPUSetExplicitly) then
init_settings.fputype:=fpu_soft;
end;
end;
else
;
end;
if (init_settings.instructionset=is_thumb) and not(CPUARM_HAS_THUMB2 in cpu_capabilities[init_settings.cputype]) then if (init_settings.instructionset=is_thumb) and not(CPUARM_HAS_THUMB2 in cpu_capabilities[init_settings.cputype]) then
begin begin