mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 17:49:25 +02:00
* parse the memory model command line options and define the FPC_MM_* macro
in the first pass of reading parameters, so that #ifdefs based on the memory models can be used in fpc.cfg git-svn-id: trunk@26793 -
This commit is contained in:
parent
6e32f8ee8f
commit
f04acb2db7
@ -753,7 +753,8 @@ begin
|
||||
(opt[1]='-') and
|
||||
(
|
||||
((length(opt)>1) and (opt[2] in ['i','d','v','T','u','n','X','l'])) or
|
||||
((length(opt)>3) and (opt[2]='F') and (opt[3]='e'))
|
||||
((length(opt)>3) and (opt[2]='F') and (opt[3]='e')) or
|
||||
((length(opt)>3) and (opt[2]='W') and (opt[3]='m'))
|
||||
)
|
||||
) then
|
||||
exit;
|
||||
@ -3102,6 +3103,14 @@ begin
|
||||
def_system_macro('FPC_HAS_TYPE_EXTENDED');
|
||||
def_system_macro('FPC_HAS_TYPE_DOUBLE');
|
||||
def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
case init_settings.x86memorymodel of
|
||||
mm_tiny: def_system_macro('FPC_MM_TINY');
|
||||
mm_small: def_system_macro('FPC_MM_SMALL');
|
||||
mm_medium: def_system_macro('FPC_MM_MEDIUM');
|
||||
mm_compact: def_system_macro('FPC_MM_COMPACT');
|
||||
mm_large: def_system_macro('FPC_MM_LARGE');
|
||||
mm_huge: def_system_macro('FPC_MM_HUGE');
|
||||
end;
|
||||
{$endif i8086}
|
||||
|
||||
if tf_cld in target_info.flags then
|
||||
@ -3541,16 +3550,6 @@ if (target_info.abi = abi_eabihf) then
|
||||
def_system_macro('FPC_HAS_INTERNAL_BSF');
|
||||
end;
|
||||
{$endif}
|
||||
{$if defined(i8086)}
|
||||
case init_settings.x86memorymodel of
|
||||
mm_tiny: def_system_macro('FPC_MM_TINY');
|
||||
mm_small: def_system_macro('FPC_MM_SMALL');
|
||||
mm_medium: def_system_macro('FPC_MM_MEDIUM');
|
||||
mm_compact: def_system_macro('FPC_MM_COMPACT');
|
||||
mm_large: def_system_macro('FPC_MM_LARGE');
|
||||
mm_huge: def_system_macro('FPC_MM_HUGE');
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
{ Section smartlinking conflicts with import sections on Windows }
|
||||
|
Loading…
Reference in New Issue
Block a user