mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 16:10:15 +02:00
* disable smart linking when using DWARF debug info (doesn't work on all
platforms) git-svn-id: trunk@12887 -
This commit is contained in:
parent
145a7bf304
commit
7ef279364b
@ -59,6 +59,7 @@ Type
|
|||||||
procedure parsecmd(cmd:string);
|
procedure parsecmd(cmd:string);
|
||||||
procedure TargetOptions(def:boolean);
|
procedure TargetOptions(def:boolean);
|
||||||
procedure CheckOptionsCompatibility;
|
procedure CheckOptionsCompatibility;
|
||||||
|
procedure ForceStaticLinking;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TOptionClass=class of toption;
|
TOptionClass=class of toption;
|
||||||
@ -446,6 +447,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure toption.ForceStaticLinking;
|
||||||
|
begin
|
||||||
|
def_system_macro('FPC_LINK_STATIC');
|
||||||
|
undef_system_macro('FPC_LINK_SMART');
|
||||||
|
undef_system_macro('FPC_LINK_DYNAMIC');
|
||||||
|
include(init_settings.globalswitches,cs_link_static);
|
||||||
|
exclude(init_settings.globalswitches,cs_link_smart);
|
||||||
|
exclude(init_settings.globalswitches,cs_link_shared);
|
||||||
|
LinkTypeSetExplicitly:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function Toption.Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
|
function Toption.Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
|
||||||
{ checks if the character after pos in Opts is a + or a - and returns resp.
|
{ checks if the character after pos in Opts is a + or a - and returns resp.
|
||||||
false or true. If it is another character (or none), it also returns false }
|
false or true. If it is another character (or none), it also returns false }
|
||||||
@ -1670,13 +1683,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
'S' :
|
'S' :
|
||||||
begin
|
begin
|
||||||
def_system_macro('FPC_LINK_STATIC');
|
ForceStaticLinking;
|
||||||
undef_system_macro('FPC_LINK_SMART');
|
|
||||||
undef_system_macro('FPC_LINK_DYNAMIC');
|
|
||||||
include(init_settings.globalswitches,cs_link_static);
|
|
||||||
exclude(init_settings.globalswitches,cs_link_smart);
|
|
||||||
exclude(init_settings.globalswitches,cs_link_shared);
|
|
||||||
LinkTypeSetExplicitly:=true;
|
|
||||||
end;
|
end;
|
||||||
'X' :
|
'X' :
|
||||||
begin
|
begin
|
||||||
@ -2201,6 +2208,11 @@ begin
|
|||||||
Message(option_switch_bin_to_src_assembler);
|
Message(option_switch_bin_to_src_assembler);
|
||||||
set_target_asm(target_info.assemextern);
|
set_target_asm(target_info.assemextern);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ smart linking does not yet work with DWARF debug info }
|
||||||
|
if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and
|
||||||
|
(cs_link_smart in init_settings.globalswitches) then
|
||||||
|
ForceStaticLinking;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user