mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-08 11:01:41 +01:00
* cleaned up the ugly hack from r25595. The default value of ts_cld for the
target is now set before the second pass of parsing the command line arguments. Then during the second pass, it can be overriden. git-svn-id: trunk@25607 -
This commit is contained in:
parent
4b3bf874df
commit
a846d0fc42
@ -38,8 +38,7 @@ Type
|
||||
LogoWritten,
|
||||
FPUSetExplicitly,
|
||||
CPUSetExplicitly,
|
||||
OptCPUSetExplicitly,
|
||||
CLDSetExplicitly: boolean;
|
||||
OptCPUSetExplicitly: boolean;
|
||||
FileLevel : longint;
|
||||
QuickInfo : string;
|
||||
FPCBinaryPath: string;
|
||||
@ -1101,8 +1100,6 @@ begin
|
||||
include(init_settings.moduleswitches,cs_create_smart);
|
||||
'T' :
|
||||
begin
|
||||
if Pos('CLD',Upper(copy(more,j+1,length(more))))>0 then // Ugly. Is there a better way?
|
||||
CLDSetExplicitly:=true;
|
||||
if not UpdateTargetSwitchStr(copy(more,j+1,length(more)),init_settings.targetswitches,true) then
|
||||
IllegalPara(opt);
|
||||
break;
|
||||
@ -2807,7 +2804,6 @@ begin
|
||||
FPUSetExplicitly:=false;
|
||||
CPUSetExplicitly:=false;
|
||||
OptCPUSetExplicitly:=false;
|
||||
CLDSetExplicitly:=false;
|
||||
FileLevel:=0;
|
||||
Quickinfo:='';
|
||||
ParaIncludeCfgPath:=TSearchPathList.Create;
|
||||
@ -3150,6 +3146,10 @@ begin
|
||||
def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
{$endif i8086}
|
||||
|
||||
if tf_cld in target_info.flags then
|
||||
if not UpdateTargetSwitchStr('CLD', init_settings.targetswitches, true) then
|
||||
InternalError(2013092801);
|
||||
|
||||
{ Set up a default prefix for binutils when cross-compiling }
|
||||
if source_info.system<>target_info.system then
|
||||
case target_info.system of
|
||||
@ -3568,9 +3568,6 @@ if (target_info.abi = abi_eabihf) then
|
||||
mm_huge: def_system_macro('FPC_MM_HUGE');
|
||||
end;
|
||||
{$endif}
|
||||
if not option.CLDSetExplicitly and (tf_cld in target_info.flags) then
|
||||
if not UpdateTargetSwitchStr('CLD', init_settings.targetswitches, true) then
|
||||
InternalError(2013092801);
|
||||
|
||||
|
||||
{ Section smartlinking conflicts with import sections on Windows }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user