Browse Source

* GROUP of smartlink units put before the C libraries
to allow for smartlinking code that uses C code.

pierre 25 years ago
parent
commit
7a2344bd3f
5 changed files with 86 additions and 65 deletions
  1. 18 14
      compiler/t_go32v1.pas
  2. 18 14
      compiler/t_go32v2.pas
  3. 18 14
      compiler/t_linux.pas
  4. 14 9
      compiler/t_os2.pas
  5. 18 14
      compiler/t_win32.pas

+ 18 - 14
compiler/t_go32v1.pas

@@ -104,6 +104,18 @@ begin
       LinkRes.AddFileName(s);
    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
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   linklibc:=false;
@@ -130,18 +142,6 @@ begin
      LinkRes.Add('-lgcc');
    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 }
   linkres.writetodisk;
   linkres.done;
@@ -186,7 +186,11 @@ end;
 end.
 {
   $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
 
   Revision 1.5  1999/11/16 23:39:04  peter
@@ -206,4 +210,4 @@ end.
     * redesigned linker object
     + library support for linux (only procedures can be exported)
 
-}
+}

+ 18 - 14
compiler/t_go32v2.pas

@@ -103,6 +103,18 @@ begin
       LinkRes.AddFileName(GetShortName(s));
    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
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   linklibc:=false;
@@ -129,18 +141,6 @@ begin
      LinkRes.Add('-lgcc');
    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 }
   linkres.writetodisk;
   linkres.done;
@@ -288,7 +288,11 @@ end;
 end.
 {
   $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
 
   Revision 1.6  1999/12/06 18:21:04  peter
@@ -313,4 +317,4 @@ end.
     * redesigned linker object
     + library support for linux (only procedures can be exported)
 
-}
+}

+ 18 - 14
compiler/t_linux.pas

@@ -311,6 +311,18 @@ begin
   if found then
    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
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   While not SharedLibFiles.Empty do
@@ -336,18 +348,6 @@ begin
    LinkRes.AddFileName(Info.DynamicLinker);
   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 }
   linkres.writetodisk;
   linkres.done;
@@ -435,7 +435,11 @@ end;
 end.
 {
   $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
 
   Revision 1.5  1999/11/16 23:39:04  peter
@@ -455,4 +459,4 @@ end.
     * redesigned linker object
     + library support for linux (only procedures can be exported)
 
-}
+}

+ 14 - 9
compiler/t_os2.pas

@@ -401,6 +401,14 @@ begin
       LinkRes.AddFileName(s);
    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
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   While not SharedLibFiles.Empty do
@@ -412,13 +420,6 @@ begin
      LinkRes.Add('-l'+s);
    end;
 
-  { Write staticlibraries }
-  While not StaticLibFiles.Empty do
-   begin
-     S:=StaticLibFiles.Get;
-     LinkRes.AddFileName(s)
-   end;
-
 { Write and Close response }
   linkres.writetodisk;
   linkres.done;
@@ -485,7 +486,11 @@ end;
 end.
 {
   $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
 
   Revision 1.6  1999/11/30 10:40:56  peter
@@ -508,4 +513,4 @@ end.
     * redesigned linker object
     + library support for linux (only procedures can be exported)
 
-}
+}

+ 18 - 14
compiler/t_win32.pas

@@ -682,6 +682,18 @@ begin
       LinkRes.AddFileName(GetShortName(s));
    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
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   linklibc:=false;
@@ -706,18 +718,6 @@ begin
    LinkRes.Add('-lc');
   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 }
   linkres.writetodisk;
   linkres.done;
@@ -1083,7 +1083,11 @@ end;
 end.
 {
   $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
 
   Revision 1.14  2000/01/07 00:10:26  peter
@@ -1141,4 +1145,4 @@ end.
     * redesigned linker object
     + library support for linux (only procedures can be exported)
 
-}
+}