mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 19:29:07 +02:00
* only display and allow ABIs that are actually supported by the current
compiler binary git-svn-id: trunk@24475 -
This commit is contained in:
parent
c4dd85a0eb
commit
1358618c36
@ -1089,7 +1089,8 @@ implementation
|
|||||||
result:=false;
|
result:=false;
|
||||||
hs:=Upper(s);
|
hs:=Upper(s);
|
||||||
for t:=low(t) to high(t) do
|
for t:=low(t) to high(t) do
|
||||||
if abi2str[t]=hs then
|
if abiinfo[t].supported and
|
||||||
|
(abiinfo[t].name=hs) then
|
||||||
begin
|
begin
|
||||||
a:=t;
|
a:=t;
|
||||||
result:=true;
|
result:=true;
|
||||||
|
@ -265,8 +265,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
for abi:=low(abi) to high(abi) do
|
for abi:=low(abi) to high(abi) do
|
||||||
begin
|
begin
|
||||||
|
if not abiinfo[abi].supported then
|
||||||
|
continue;
|
||||||
hs:=s;
|
hs:=s;
|
||||||
hs1:=abi2str[abi];
|
hs1:=abiinfo[abi].name;
|
||||||
if hs1<>'' then
|
if hs1<>'' then
|
||||||
begin
|
begin
|
||||||
Replace(hs,'$ABITARGETS',hs1);
|
Replace(hs,'$ABITARGETS',hs1);
|
||||||
@ -3047,8 +3049,8 @@ begin
|
|||||||
|
|
||||||
{ define abi }
|
{ define abi }
|
||||||
for abi:=low(tabi) to high(tabi) do
|
for abi:=low(tabi) to high(tabi) do
|
||||||
undef_system_macro('FPC_ABI_'+abi2str[abi]);
|
undef_system_macro('FPC_ABI_'+abiinfo[abi].name);
|
||||||
def_system_macro('FPC_ABI_'+abi2str[target_info.abi]);
|
def_system_macro('FPC_ABI_'+abiinfo[target_info.abi].name);
|
||||||
|
|
||||||
{ Define FPC_ABI_EABI in addition to FPC_ABI_EABIHF on EABI VFP hardfloat
|
{ 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}
|
systems since most code needs to behave the same on both}
|
||||||
|
@ -215,6 +215,11 @@ interface
|
|||||||
abi : tabi;
|
abi : tabi;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
tabiinfo = record
|
||||||
|
name: string[10];
|
||||||
|
supported: boolean;
|
||||||
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
{ alias for supported_target field in tasminfo }
|
{ alias for supported_target field in tasminfo }
|
||||||
system_any = system_none;
|
system_any = system_none;
|
||||||
@ -345,8 +350,14 @@ interface
|
|||||||
('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
|
('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
|
||||||
'mipseb','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086');
|
'mipseb','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086');
|
||||||
|
|
||||||
abi2str : array[tabi] of string[10] =
|
abiinfo : array[tabi] of tabiinfo = (
|
||||||
('DEFAULT','SYSV','AIX','EABI','ARMEB','EABIHF');
|
(name: 'DEFAULT'; supported: true),
|
||||||
|
(name: 'SYSV' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}),
|
||||||
|
(name: 'AIX' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}),
|
||||||
|
(name: 'EABI' ; supported:{$ifdef FPC_ARMEL}true{$else}false{$endif}),
|
||||||
|
(name: 'ARMEB' ; supported:{$ifdef FPC_ARMEB}true{$else}false{$endif}),
|
||||||
|
(name: 'EABIHF' ; supported:{$ifdef FPC_ARMHF}true{$else}false{$endif})
|
||||||
|
);
|
||||||
|
|
||||||
var
|
var
|
||||||
targetinfos : array[tsystem] of psysteminfo;
|
targetinfos : array[tsystem] of psysteminfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user