mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* define CPU and FPU type macros before the second parsing of the parameters so they can be used in config files
git-svn-id: trunk@37582 -
This commit is contained in:
parent
6cd65d9511
commit
826f208e45
@ -3332,8 +3332,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure read_arguments(cmd:TCmdStr);
|
procedure read_arguments(cmd:TCmdStr);
|
||||||
|
|
||||||
|
procedure def_cpu_macros;
|
||||||
|
var
|
||||||
|
abi : tabi;
|
||||||
|
fputype : tfputype;
|
||||||
|
cputype : tcputype;
|
||||||
|
begin
|
||||||
|
for cputype:=low(tcputype) to high(tcputype) do
|
||||||
|
undef_system_macro('CPU'+Cputypestr[cputype]);
|
||||||
|
def_system_macro('CPU'+Cputypestr[init_settings.cputype]);
|
||||||
|
|
||||||
|
for fputype:=low(tfputype) to high(tfputype) do
|
||||||
|
undef_system_macro('FPU'+fputypestr[fputype]);
|
||||||
|
def_system_macro('FPU'+fputypestr[init_settings.fputype]);
|
||||||
|
|
||||||
|
{ define abi }
|
||||||
|
for abi:=low(tabi) to high(tabi) do
|
||||||
|
undef_system_macro('FPC_ABI_'+abiinfo[abi].name);
|
||||||
|
def_system_macro('FPC_ABI_'+abiinfo[target_info.abi].name);
|
||||||
|
|
||||||
|
{ Define FPC_ABI_EABI in addition to FPC_ABI_EABIHF on EABI VFP hardfloat
|
||||||
|
systems since most code needs to behave the same on both}
|
||||||
|
if target_info.abi = abi_eabihf then
|
||||||
|
def_system_macro('FPC_ABI_EABI');
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
env: ansistring;
|
env: ansistring;
|
||||||
i : tfeature;
|
i : tfeature;
|
||||||
@ -3608,6 +3633,8 @@ begin
|
|||||||
def_system_macro('CPUINT64');
|
def_system_macro('CPUINT64');
|
||||||
{$endif defined(cpu64bitalu)}
|
{$endif defined(cpu64bitalu)}
|
||||||
|
|
||||||
|
def_cpu_macros;
|
||||||
|
|
||||||
if tf_cld in target_info.flags then
|
if tf_cld in target_info.flags then
|
||||||
if not UpdateTargetSwitchStr('CLD', init_settings.targetswitches, true) then
|
if not UpdateTargetSwitchStr('CLD', init_settings.targetswitches, true) then
|
||||||
InternalError(2013092801);
|
InternalError(2013092801);
|
||||||
@ -3702,16 +3729,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ define abi }
|
|
||||||
for abi:=low(tabi) to high(tabi) do
|
|
||||||
undef_system_macro('FPC_ABI_'+abiinfo[abi].name);
|
|
||||||
def_system_macro('FPC_ABI_'+abiinfo[target_info.abi].name);
|
|
||||||
|
|
||||||
{ Define FPC_ABI_EABI in addition to FPC_ABI_EABIHF on EABI VFP hardfloat
|
|
||||||
systems since most code needs to behave the same on both}
|
|
||||||
if target_info.abi = abi_eabihf then
|
|
||||||
def_system_macro('FPC_ABI_EABI');
|
|
||||||
|
|
||||||
{ Write logo }
|
{ Write logo }
|
||||||
if option.ParaLogo then
|
if option.ParaLogo then
|
||||||
option.writelogo;
|
option.writelogo;
|
||||||
@ -4041,7 +4058,7 @@ begin
|
|||||||
{$endif m68k}
|
{$endif m68k}
|
||||||
|
|
||||||
{ now we can define cpu and fpu type }
|
{ now we can define cpu and fpu type }
|
||||||
def_system_macro('CPU'+Cputypestr[init_settings.cputype]);
|
def_cpu_macros;
|
||||||
|
|
||||||
{ Use init_settings cpu type for asm cpu type,
|
{ Use init_settings cpu type for asm cpu type,
|
||||||
if asmcputype is cpu_none,
|
if asmcputype is cpu_none,
|
||||||
@ -4050,8 +4067,6 @@ begin
|
|||||||
if init_settings.asmcputype = cpu_none then
|
if init_settings.asmcputype = cpu_none then
|
||||||
init_settings.asmcputype:=init_settings.cputype;
|
init_settings.asmcputype:=init_settings.cputype;
|
||||||
|
|
||||||
def_system_macro('FPU'+fputypestr[init_settings.fputype]);
|
|
||||||
|
|
||||||
{$ifdef llvm}
|
{$ifdef llvm}
|
||||||
def_system_macro('CPULLVM');
|
def_system_macro('CPULLVM');
|
||||||
{$endif llvm}
|
{$endif llvm}
|
||||||
|
Loading…
Reference in New Issue
Block a user