mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 19:10:29 +02:00
* fixed shared library linking for glibc2 systems
This commit is contained in:
parent
8e6c15972e
commit
9dda467212
@ -151,6 +151,8 @@ begin
|
||||
begin
|
||||
{ create mask which unit files need linking }
|
||||
mask:=link_allways;
|
||||
if hp^.is_unit then
|
||||
begin
|
||||
{ static linking ? }
|
||||
if (cs_link_static in aktglobalswitches) then
|
||||
begin
|
||||
@ -193,6 +195,12 @@ begin
|
||||
else
|
||||
mask:=mask or link_shared;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ for programs link always static }
|
||||
mask:=mask or link_static;
|
||||
end;
|
||||
{ unit files }
|
||||
while not linkunitofiles.empty do
|
||||
AddObject(linkunitofiles.getusemask(mask));
|
||||
@ -444,7 +452,7 @@ begin
|
||||
end;
|
||||
|
||||
{ Fix command line options }
|
||||
If not SharedLibFiles.Empty then
|
||||
If (DynamicLinker<>'') and (not SharedLibFiles.Empty) then
|
||||
LinkOptions:='-dynamic-linker='+DynamicLinker+' '+LinkOptions;
|
||||
if Strip and not(cs_debuginfo in aktmoduleswitches) and
|
||||
not (Target_Link.StripBind) then
|
||||
@ -514,7 +522,10 @@ begin
|
||||
WriteResFileName(s);
|
||||
end;
|
||||
|
||||
{ Write sharedlibraries like -l<lib> }
|
||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
||||
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||
if (DynamicLinker<>'') and (not SharedLibFiles.Empty) then
|
||||
WriteResFileName(DynamicLinker);
|
||||
While not SharedLibFiles.Empty do
|
||||
begin
|
||||
S:=SharedLibFiles.Get;
|
||||
@ -717,7 +728,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.62 1999-07-27 11:05:51 peter
|
||||
Revision 1.63 1999-07-29 01:31:39 peter
|
||||
* fixed shared library linking for glibc2 systems
|
||||
|
||||
Revision 1.62 1999/07/27 11:05:51 peter
|
||||
* glibc 2.1.2 support
|
||||
|
||||
Revision 1.61 1999/07/18 10:19:53 florian
|
||||
|
Loading…
Reference in New Issue
Block a user