|
@@ -30,6 +30,7 @@ uses cobjects,files;
|
|
Type
|
|
Type
|
|
TLinker = Object
|
|
TLinker = Object
|
|
Glibc2,
|
|
Glibc2,
|
|
|
|
+ Glibc21,
|
|
LinkToC, { Should we link to the C libs? }
|
|
LinkToC, { Should we link to the C libs? }
|
|
Strip : Boolean; { Strip symbols ? }
|
|
Strip : Boolean; { Strip symbols ? }
|
|
ObjectFiles,
|
|
ObjectFiles,
|
|
@@ -96,13 +97,19 @@ begin
|
|
StaticLibFiles.Init_no_double;
|
|
StaticLibFiles.Init_no_double;
|
|
LinkToC:=False;
|
|
LinkToC:=False;
|
|
Glibc2:=false;
|
|
Glibc2:=false;
|
|
|
|
+ Glibc21:=false;
|
|
Strip:=false;
|
|
Strip:=false;
|
|
LinkOptions:='';
|
|
LinkOptions:='';
|
|
{$ifdef linux}
|
|
{$ifdef linux}
|
|
{ first try glibc2 }
|
|
{ first try glibc2 }
|
|
DynamicLinker:='/lib/ld-linux.so.2';
|
|
DynamicLinker:='/lib/ld-linux.so.2';
|
|
if FileExists(DynamicLinker) then
|
|
if FileExists(DynamicLinker) then
|
|
- Glibc2:=true
|
|
|
|
|
|
+ begin
|
|
|
|
+ Glibc2:=true;
|
|
|
|
+ { also glibc 2.1 ?}
|
|
|
|
+ if FileExists('/lib/ld-2.1.1.so') then
|
|
|
|
+ Glibc21:=true;
|
|
|
|
+ end
|
|
else
|
|
else
|
|
DynamicLinker:='/lib/ld-linux.so.1';
|
|
DynamicLinker:='/lib/ld-linux.so.1';
|
|
LibrarySearchPath:='/lib;/usr/lib;/usr/lib/X11';
|
|
LibrarySearchPath:='/lib;/usr/lib;/usr/lib/X11';
|
|
@@ -294,7 +301,10 @@ Function TLinker.WriteResponseFile : Boolean;
|
|
Var
|
|
Var
|
|
LinkResponse : Text;
|
|
LinkResponse : Text;
|
|
i : longint;
|
|
i : longint;
|
|
- prtobj,s,s2 : string;
|
|
|
|
|
|
+ cprtobj,
|
|
|
|
+ gprtobj,
|
|
|
|
+ prtobj : string[80];
|
|
|
|
+ s,s2 : string;
|
|
found,linux_link_c,
|
|
found,linux_link_c,
|
|
linklibc : boolean;
|
|
linklibc : boolean;
|
|
|
|
|
|
@@ -308,7 +318,7 @@ Var
|
|
begin
|
|
begin
|
|
if s<>'' then
|
|
if s<>'' then
|
|
begin
|
|
begin
|
|
- if not(s[1] in ['a'..'z','A'..'Z','/','\']) then
|
|
|
|
|
|
+ if not(s[1] in ['a'..'z','A'..'Z','/','\','.']) then
|
|
Write(Linkresponse,'.',DirSep);
|
|
Write(Linkresponse,'.',DirSep);
|
|
WriteLn(Linkresponse,s);
|
|
WriteLn(Linkresponse,s);
|
|
end;
|
|
end;
|
|
@@ -320,6 +330,13 @@ begin
|
|
{ set special options for some targets }
|
|
{ set special options for some targets }
|
|
linklibc:=SharedLibFiles.Find('c');
|
|
linklibc:=SharedLibFiles.Find('c');
|
|
prtobj:='prt0';
|
|
prtobj:='prt0';
|
|
|
|
+ cprtobj:='cprt0';
|
|
|
|
+ gprtobj:='gprt0';
|
|
|
|
+ if glibc21 then
|
|
|
|
+ begin
|
|
|
|
+ cprtobj:='cprt21';
|
|
|
|
+ gprtobj:='gprt21';
|
|
|
|
+ end;
|
|
case target_info.target of
|
|
case target_info.target of
|
|
target_m68k_Palmos,
|
|
target_m68k_Palmos,
|
|
target_i386_Win32 :
|
|
target_i386_Win32 :
|
|
@@ -334,7 +351,7 @@ begin
|
|
begin
|
|
begin
|
|
if cs_profile in aktmoduleswitches then
|
|
if cs_profile in aktmoduleswitches then
|
|
begin
|
|
begin
|
|
- prtobj:='gprt0';
|
|
|
|
|
|
+ prtobj:=gprtobj;
|
|
if not glibc2 then
|
|
if not glibc2 then
|
|
AddSharedLibrary('gmon');
|
|
AddSharedLibrary('gmon');
|
|
AddSharedLibrary('c');
|
|
AddSharedLibrary('c');
|
|
@@ -343,7 +360,7 @@ begin
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
if linklibc then
|
|
if linklibc then
|
|
- prtobj:='cprt0';
|
|
|
|
|
|
+ prtobj:=cprtobj;
|
|
end;
|
|
end;
|
|
if linklibc then
|
|
if linklibc then
|
|
linux_link_c:=true;
|
|
linux_link_c:=true;
|
|
@@ -620,7 +637,10 @@ end;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.51 1999-04-28 23:42:33 pierre
|
|
|
|
|
|
+ Revision 1.52 1999-05-03 21:30:30 peter
|
|
|
|
+ + glibc 2.1
|
|
|
|
+
|
|
|
|
+ Revision 1.51 1999/04/28 23:42:33 pierre
|
|
* removing of temporary directory with -s option
|
|
* removing of temporary directory with -s option
|
|
|
|
|
|
Revision 1.50 1999/04/25 14:31:48 daniel
|
|
Revision 1.50 1999/04/25 14:31:48 daniel
|