|
@@ -29,6 +29,7 @@ uses cobjects,files;
|
|
|
|
|
|
Type
|
|
Type
|
|
TLinker = Object
|
|
TLinker = Object
|
|
|
|
+ Glibc2,
|
|
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,
|
|
@@ -92,12 +93,16 @@ begin
|
|
SharedLibFiles.Doubles:=False;
|
|
SharedLibFiles.Doubles:=False;
|
|
StaticLibFiles.Doubles:=False;
|
|
StaticLibFiles.Doubles:=False;
|
|
LinkToC:=False;
|
|
LinkToC:=False;
|
|
|
|
+ Glibc2:=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 not FileExists(DynamicLinker) then
|
|
|
|
|
|
+ if FileExists(DynamicLinker) then
|
|
|
|
+ Glibc2:=true
|
|
|
|
+ else
|
|
|
|
+
|
|
DynamicLinker:='/lib/ld-linux.so.1';
|
|
DynamicLinker:='/lib/ld-linux.so.1';
|
|
LibrarySearchPath:='/lib;/usr/lib';
|
|
LibrarySearchPath:='/lib;/usr/lib';
|
|
{$else}
|
|
{$else}
|
|
@@ -274,7 +279,8 @@ begin
|
|
if cs_profile in aktmoduleswitches then
|
|
if cs_profile in aktmoduleswitches then
|
|
begin
|
|
begin
|
|
prtobj:='gprt0';
|
|
prtobj:='gprt0';
|
|
- AddSharedLibrary('gmon');
|
|
|
|
|
|
+ if not glibc2 then
|
|
|
|
+ AddSharedLibrary('gmon');
|
|
AddSharedLibrary('c');
|
|
AddSharedLibrary('c');
|
|
linklibc:=true;
|
|
linklibc:=true;
|
|
end
|
|
end
|
|
@@ -330,12 +336,8 @@ begin
|
|
WriteRes(FindObjectFile(prtobj));
|
|
WriteRes(FindObjectFile(prtobj));
|
|
if linklibc then
|
|
if linklibc then
|
|
begin
|
|
begin
|
|
- s2:=search('crti.o',librarysearchpath,found);
|
|
|
|
- if s2<>'' then
|
|
|
|
- begin
|
|
|
|
- WriteRes(s2+'crti.o');
|
|
|
|
- WriteRes(s2+'crtbegin.o');
|
|
|
|
- end;
|
|
|
|
|
|
+ WriteRes(search('crti.o',librarysearchpath,found)+'crti.o');
|
|
|
|
+ WriteRes(search('crtbegin.o',librarysearchpath,found)+'crtbegin.o');
|
|
end;
|
|
end;
|
|
|
|
|
|
while not ObjectFiles.Empty do
|
|
while not ObjectFiles.Empty do
|
|
@@ -346,11 +348,8 @@ begin
|
|
end;
|
|
end;
|
|
if linklibc then
|
|
if linklibc then
|
|
begin
|
|
begin
|
|
- if s2<>'' then
|
|
|
|
- begin
|
|
|
|
- WriteRes(s2+'crtend.o');
|
|
|
|
- WriteRes(s2+'crtn.o');
|
|
|
|
- end;
|
|
|
|
|
|
+ WriteRes(search('crtend.o',librarysearchpath,found)+'crtend.o');
|
|
|
|
+ WriteRes(search('crtn.o',librarysearchpath,found)+'crtn.o');
|
|
end;
|
|
end;
|
|
|
|
|
|
{ Write sharedlibraries like -l<lib> }
|
|
{ Write sharedlibraries like -l<lib> }
|
|
@@ -489,7 +488,10 @@ end;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.21 1998-08-31 12:26:26 peter
|
|
|
|
|
|
+ Revision 1.22 1998-09-01 09:01:00 peter
|
|
|
|
+ + glibc2 support
|
|
|
|
+
|
|
|
|
+ Revision 1.21 1998/08/31 12:26:26 peter
|
|
* m68k and palmos updates from surebugfixes
|
|
* m68k and palmos updates from surebugfixes
|
|
|
|
|
|
Revision 1.20 1998/08/19 10:06:14 peter
|
|
Revision 1.20 1998/08/19 10:06:14 peter
|