mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 08:09:49 +01:00
* GROUP of smartlink units put before the C libraries
to allow for smartlinking code that uses C code.
This commit is contained in:
parent
beebcdebfc
commit
7a2344bd3f
@ -104,6 +104,18 @@ begin
|
|||||||
LinkRes.AddFileName(s);
|
LinkRes.AddFileName(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Write staticlibraries }
|
||||||
|
if not StaticLibFiles.Empty then
|
||||||
|
begin
|
||||||
|
LinkRes.Add('-(');
|
||||||
|
While not StaticLibFiles.Empty do
|
||||||
|
begin
|
||||||
|
S:=StaticLibFiles.Get;
|
||||||
|
LinkRes.AddFileName(s)
|
||||||
|
end;
|
||||||
|
LinkRes.Add('-)');
|
||||||
|
end;
|
||||||
|
|
||||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
{ 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) }
|
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||||
linklibc:=false;
|
linklibc:=false;
|
||||||
@ -130,18 +142,6 @@ begin
|
|||||||
LinkRes.Add('-lgcc');
|
LinkRes.Add('-lgcc');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Write staticlibraries }
|
|
||||||
if not StaticLibFiles.Empty then
|
|
||||||
begin
|
|
||||||
LinkRes.Add('-(');
|
|
||||||
While not StaticLibFiles.Empty do
|
|
||||||
begin
|
|
||||||
S:=StaticLibFiles.Get;
|
|
||||||
LinkRes.AddFileName(s)
|
|
||||||
end;
|
|
||||||
LinkRes.Add('-)');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Write and Close response }
|
{ Write and Close response }
|
||||||
linkres.writetodisk;
|
linkres.writetodisk;
|
||||||
linkres.done;
|
linkres.done;
|
||||||
@ -186,7 +186,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2000-01-07 01:14:42 peter
|
Revision 1.7 2000-01-09 00:55:51 pierre
|
||||||
|
* GROUP of smartlink units put before the C libraries
|
||||||
|
to allow for smartlinking code that uses C code.
|
||||||
|
|
||||||
|
Revision 1.6 2000/01/07 01:14:42 peter
|
||||||
* updated copyright to 2000
|
* updated copyright to 2000
|
||||||
|
|
||||||
Revision 1.5 1999/11/16 23:39:04 peter
|
Revision 1.5 1999/11/16 23:39:04 peter
|
||||||
@ -206,4 +210,4 @@ end.
|
|||||||
* redesigned linker object
|
* redesigned linker object
|
||||||
+ library support for linux (only procedures can be exported)
|
+ library support for linux (only procedures can be exported)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,6 +103,18 @@ begin
|
|||||||
LinkRes.AddFileName(GetShortName(s));
|
LinkRes.AddFileName(GetShortName(s));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Write staticlibraries }
|
||||||
|
if not StaticLibFiles.Empty then
|
||||||
|
begin
|
||||||
|
LinkRes.Add('-(');
|
||||||
|
While not StaticLibFiles.Empty do
|
||||||
|
begin
|
||||||
|
S:=StaticLibFiles.Get;
|
||||||
|
LinkRes.AddFileName(GetShortName(s))
|
||||||
|
end;
|
||||||
|
LinkRes.Add('-)');
|
||||||
|
end;
|
||||||
|
|
||||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
{ 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) }
|
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||||
linklibc:=false;
|
linklibc:=false;
|
||||||
@ -129,18 +141,6 @@ begin
|
|||||||
LinkRes.Add('-lgcc');
|
LinkRes.Add('-lgcc');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Write staticlibraries }
|
|
||||||
if not StaticLibFiles.Empty then
|
|
||||||
begin
|
|
||||||
LinkRes.Add('-(');
|
|
||||||
While not StaticLibFiles.Empty do
|
|
||||||
begin
|
|
||||||
S:=StaticLibFiles.Get;
|
|
||||||
LinkRes.AddFileName(GetShortName(s))
|
|
||||||
end;
|
|
||||||
LinkRes.Add('-)');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Write and Close response }
|
{ Write and Close response }
|
||||||
linkres.writetodisk;
|
linkres.writetodisk;
|
||||||
linkres.done;
|
linkres.done;
|
||||||
@ -288,7 +288,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2000-01-07 01:14:42 peter
|
Revision 1.8 2000-01-09 00:55:51 pierre
|
||||||
|
* GROUP of smartlink units put before the C libraries
|
||||||
|
to allow for smartlinking code that uses C code.
|
||||||
|
|
||||||
|
Revision 1.7 2000/01/07 01:14:42 peter
|
||||||
* updated copyright to 2000
|
* updated copyright to 2000
|
||||||
|
|
||||||
Revision 1.6 1999/12/06 18:21:04 peter
|
Revision 1.6 1999/12/06 18:21:04 peter
|
||||||
@ -313,4 +317,4 @@ end.
|
|||||||
* redesigned linker object
|
* redesigned linker object
|
||||||
+ library support for linux (only procedures can be exported)
|
+ library support for linux (only procedures can be exported)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -311,6 +311,18 @@ begin
|
|||||||
if found then
|
if found then
|
||||||
LinkRes.AddFileName(s);
|
LinkRes.AddFileName(s);
|
||||||
|
|
||||||
|
{ Write staticlibraries }
|
||||||
|
if not StaticLibFiles.Empty then
|
||||||
|
begin
|
||||||
|
LinkRes.Add('GROUP(');
|
||||||
|
While not StaticLibFiles.Empty do
|
||||||
|
begin
|
||||||
|
S:=StaticLibFiles.Get;
|
||||||
|
LinkRes.AddFileName(s)
|
||||||
|
end;
|
||||||
|
LinkRes.Add(')');
|
||||||
|
end;
|
||||||
|
|
||||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
{ 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) }
|
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||||
While not SharedLibFiles.Empty do
|
While not SharedLibFiles.Empty do
|
||||||
@ -336,18 +348,6 @@ begin
|
|||||||
LinkRes.AddFileName(Info.DynamicLinker);
|
LinkRes.AddFileName(Info.DynamicLinker);
|
||||||
LinkRes.Add(')');
|
LinkRes.Add(')');
|
||||||
|
|
||||||
{ Write staticlibraries }
|
|
||||||
if not StaticLibFiles.Empty then
|
|
||||||
begin
|
|
||||||
LinkRes.Add('GROUP(');
|
|
||||||
While not StaticLibFiles.Empty do
|
|
||||||
begin
|
|
||||||
S:=StaticLibFiles.Get;
|
|
||||||
LinkRes.AddFileName(s)
|
|
||||||
end;
|
|
||||||
LinkRes.Add(')');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Write and Close response }
|
{ Write and Close response }
|
||||||
linkres.writetodisk;
|
linkres.writetodisk;
|
||||||
linkres.done;
|
linkres.done;
|
||||||
@ -435,7 +435,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2000-01-07 01:14:42 peter
|
Revision 1.7 2000-01-09 00:55:51 pierre
|
||||||
|
* GROUP of smartlink units put before the C libraries
|
||||||
|
to allow for smartlinking code that uses C code.
|
||||||
|
|
||||||
|
Revision 1.6 2000/01/07 01:14:42 peter
|
||||||
* updated copyright to 2000
|
* updated copyright to 2000
|
||||||
|
|
||||||
Revision 1.5 1999/11/16 23:39:04 peter
|
Revision 1.5 1999/11/16 23:39:04 peter
|
||||||
@ -455,4 +459,4 @@ end.
|
|||||||
* redesigned linker object
|
* redesigned linker object
|
||||||
+ library support for linux (only procedures can be exported)
|
+ library support for linux (only procedures can be exported)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -401,6 +401,14 @@ begin
|
|||||||
LinkRes.AddFileName(s);
|
LinkRes.AddFileName(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Write staticlibraries }
|
||||||
|
{ No group !! This will not work correctly PM }
|
||||||
|
While not StaticLibFiles.Empty do
|
||||||
|
begin
|
||||||
|
S:=StaticLibFiles.Get;
|
||||||
|
LinkRes.AddFileName(s)
|
||||||
|
end;
|
||||||
|
|
||||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
{ 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) }
|
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||||
While not SharedLibFiles.Empty do
|
While not SharedLibFiles.Empty do
|
||||||
@ -412,13 +420,6 @@ begin
|
|||||||
LinkRes.Add('-l'+s);
|
LinkRes.Add('-l'+s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Write staticlibraries }
|
|
||||||
While not StaticLibFiles.Empty do
|
|
||||||
begin
|
|
||||||
S:=StaticLibFiles.Get;
|
|
||||||
LinkRes.AddFileName(s)
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Write and Close response }
|
{ Write and Close response }
|
||||||
linkres.writetodisk;
|
linkres.writetodisk;
|
||||||
linkres.done;
|
linkres.done;
|
||||||
@ -485,7 +486,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2000-01-07 01:14:43 peter
|
Revision 1.8 2000-01-09 00:55:51 pierre
|
||||||
|
* GROUP of smartlink units put before the C libraries
|
||||||
|
to allow for smartlinking code that uses C code.
|
||||||
|
|
||||||
|
Revision 1.7 2000/01/07 01:14:43 peter
|
||||||
* updated copyright to 2000
|
* updated copyright to 2000
|
||||||
|
|
||||||
Revision 1.6 1999/11/30 10:40:56 peter
|
Revision 1.6 1999/11/30 10:40:56 peter
|
||||||
@ -508,4 +513,4 @@ end.
|
|||||||
* redesigned linker object
|
* redesigned linker object
|
||||||
+ library support for linux (only procedures can be exported)
|
+ library support for linux (only procedures can be exported)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -682,6 +682,18 @@ begin
|
|||||||
LinkRes.AddFileName(GetShortName(s));
|
LinkRes.AddFileName(GetShortName(s));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Write staticlibraries }
|
||||||
|
if not StaticLibFiles.Empty then
|
||||||
|
begin
|
||||||
|
LinkRes.Add('GROUP(');
|
||||||
|
While not StaticLibFiles.Empty do
|
||||||
|
begin
|
||||||
|
S:=StaticLibFiles.Get;
|
||||||
|
LinkRes.AddFileName(GetShortName(s));
|
||||||
|
end;
|
||||||
|
LinkRes.Add(')');
|
||||||
|
end;
|
||||||
|
|
||||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
{ 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) }
|
here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
|
||||||
linklibc:=false;
|
linklibc:=false;
|
||||||
@ -706,18 +718,6 @@ begin
|
|||||||
LinkRes.Add('-lc');
|
LinkRes.Add('-lc');
|
||||||
LinkRes.Add(')');
|
LinkRes.Add(')');
|
||||||
|
|
||||||
{ Write staticlibraries }
|
|
||||||
if not StaticLibFiles.Empty then
|
|
||||||
begin
|
|
||||||
LinkRes.Add('GROUP(');
|
|
||||||
While not StaticLibFiles.Empty do
|
|
||||||
begin
|
|
||||||
S:=StaticLibFiles.Get;
|
|
||||||
LinkRes.AddFileName(GetShortName(s));
|
|
||||||
end;
|
|
||||||
LinkRes.Add(')');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Write and Close response }
|
{ Write and Close response }
|
||||||
linkres.writetodisk;
|
linkres.writetodisk;
|
||||||
linkres.done;
|
linkres.done;
|
||||||
@ -1083,7 +1083,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 2000-01-07 01:14:43 peter
|
Revision 1.16 2000-01-09 00:55:51 pierre
|
||||||
|
* GROUP of smartlink units put before the C libraries
|
||||||
|
to allow for smartlinking code that uses C code.
|
||||||
|
|
||||||
|
Revision 1.15 2000/01/07 01:14:43 peter
|
||||||
* updated copyright to 2000
|
* updated copyright to 2000
|
||||||
|
|
||||||
Revision 1.14 2000/01/07 00:10:26 peter
|
Revision 1.14 2000/01/07 00:10:26 peter
|
||||||
@ -1141,4 +1145,4 @@ end.
|
|||||||
* redesigned linker object
|
* redesigned linker object
|
||||||
+ library support for linux (only procedures can be exported)
|
+ library support for linux (only procedures can be exported)
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user