mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 09:59:25 +02:00
+ based on a patch by Christo Crause create a define for the selected controller type (FPC_MCU_...), resolves #33191
git-svn-id: trunk@38284 -
This commit is contained in:
parent
2251e87e41
commit
5c18758b12
@ -3352,6 +3352,8 @@ procedure read_arguments(cmd:TCmdStr);
|
||||
abi : tabi;
|
||||
fputype : tfputype;
|
||||
cputype : tcputype;
|
||||
controller: tcontrollertype;
|
||||
s: string;
|
||||
begin
|
||||
for cputype:=low(tcputype) to high(tcputype) do
|
||||
undef_system_macro('CPU'+Cputypestr[cputype]);
|
||||
@ -3361,11 +3363,28 @@ procedure read_arguments(cmd:TCmdStr);
|
||||
undef_system_macro('FPU'+fputypestr[fputype]);
|
||||
def_system_macro('FPU'+fputypestr[init_settings.fputype]);
|
||||
|
||||
{$PUSH}
|
||||
{$WARN 6018 OFF} { Unreachable code due to compile time evaluation }
|
||||
if ControllerSupport then
|
||||
begin
|
||||
for controller:=low(tcontrollertype) to high(tcontrollertype) do
|
||||
begin
|
||||
s:=embedded_controllers[controller].controllertypestr;
|
||||
if s<>'' then
|
||||
undef_system_macro('FPC_MCU_'+s);
|
||||
end;
|
||||
s:=embedded_controllers[init_settings.controllertype].controllertypestr;
|
||||
if s<>'' then
|
||||
def_system_macro('FPC_MCU_'+s);
|
||||
end;
|
||||
{$POP}
|
||||
|
||||
{ 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
|
||||
|
Loading…
Reference in New Issue
Block a user