* static linking fixes

This commit is contained in:
Károly Balogh 2005-04-25 15:58:59 +00:00
parent 3c6d74c4d9
commit f57803d67a

View File

@ -138,7 +138,8 @@ begin
if not StaticLibFiles.Empty then if not StaticLibFiles.Empty then
begin begin
{ vlink doesn't need, and doesn't support GROUP } { vlink doesn't need, and doesn't support GROUP }
if (cs_link_on_target in aktglobalswitches) then begin if (cs_link_on_target in aktglobalswitches) then
begin
LinkRes.Add(')'); LinkRes.Add(')');
LinkRes.Add('GROUP('); LinkRes.Add('GROUP(');
end; end;
@ -148,6 +149,9 @@ begin
LinkRes.AddFileName(maybequoted(s)); LinkRes.AddFileName(maybequoted(s));
end; end;
end; end;
if (cs_link_on_target in aktglobalswitches) then
begin
LinkRes.Add(')'); LinkRes.Add(')');
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
@ -175,6 +179,17 @@ begin
LinkRes.Add('-lc'); LinkRes.Add('-lc');
LinkRes.Add('-lgcc'); LinkRes.Add('-lgcc');
end; end;
end
else
begin
while not SharedLibFiles.Empty do
begin
S:=SharedLibFiles.GetFirst;
LinkRes.Add('lib'+s+target_info.staticlibext);
end;
LinkRes.Add(')');
end;
{ Write and Close response } { Write and Close response }
linkres.writetodisk; linkres.writetodisk;
@ -255,7 +270,10 @@ initialization
end. end.
{ {
$Log$ $Log$
Revision 1.13 2005-02-14 17:13:10 peter Revision 1.14 2005-04-25 15:58:59 karoly
* static linking fixes
Revision 1.13 2005/02/14 17:13:10 peter
* truncate log * truncate log
Revision 1.12 2005/02/11 07:23:22 karoly Revision 1.12 2005/02/11 07:23:22 karoly