Răsfoiți Sursa

* added GROUP for .a files to linker script

armin 21 ani în urmă
părinte
comite
384e2e4d43
2 a modificat fișierele cu 18 adăugiri și 19 ștergeri
  1. 9 4
      compiler/systems/t_nwl.pas
  2. 9 15
      compiler/systems/t_nwm.pas

+ 9 - 4
compiler/systems/t_nwl.pas

@@ -359,7 +359,7 @@ begin
   {$endif}
 
   { add objectfiles, start with nwpre always }
-  LinkRes.Add ('INPUT (');
+  LinkRes.Add ('INPUT(');
   s2 := FindObjectFile('nwplibc','',false);
   if s2 = '' then
     s2 := FindObjectFile('libcpre.gcc','',false);
@@ -384,6 +384,7 @@ begin
       {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
     end;
   end;
+  LinkRes.Add (')');
 
   { output file (nlm), add to nlmconv }
   {$ifndef netware}
@@ -404,9 +405,10 @@ begin
     Comment(V_Debug,'DEBUG');
   end;
 
-  { Write staticlibraries, is that correct ? }
+  { Write staticlibraries }
   if not StaticLibFiles.Empty then
    begin
+     LinkRes.Add ('GROUP(');
      While not StaticLibFiles.Empty do
       begin
         S:=lower (StaticLibFiles.GetFirst);
@@ -436,6 +438,7 @@ begin
          end;
         end
       end;
+     LinkRes.Add (')');
    end;
 
   if not SharedLibFiles.Empty then
@@ -502,7 +505,6 @@ begin
    end;
 
 { Write and Close response for ld, response for nlmconv is in NLMConvLinkFile(not written) }
-  linkres.Add (')');
   linkres.writetodisk;
   LinkRes.Free;
 
@@ -651,7 +653,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.5  2004-09-22 15:25:14  mazen
+  Revision 1.6  2004-09-24 10:48:31  armin
+  * added GROUP for .a files to linker script
+
+  Revision 1.5  2004/09/22 15:25:14  mazen
   * Fix error committing : previous version must be in branch USE_SYSUTILS
 
   Revision 1.3  2004/09/19 18:10:32  armin

+ 9 - 15
compiler/systems/t_nwm.pas

@@ -351,12 +351,8 @@ begin
   {$endif}
 
   { add objectfiles, start with nwpre always }
-  LinkRes.Add ('INPUT (');
-  {$ifdef NETWARE_LIBC}
-  s2 := FindObjectFile('nwplibc','',false);
-  {$else}
+  LinkRes.Add ('INPUT(');
   s2 := FindObjectFile('nwpre','',false);
-  {$endif}
   Comment (V_Debug,'adding Object File '+s2);
   {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
 
@@ -371,6 +367,7 @@ begin
       {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
     end;
   end;
+  LinkRes.Add (')');
 
   { output file (nlm), add to nlmconv }
   {$ifndef netware}
@@ -380,15 +377,9 @@ begin
   {$endif}
   
   { start and stop-procedures }
-  {$ifdef NETWARE_LIBC}
-  NLMConvLinkFile.Add ('START _LibCPrelude');
-  NLMConvLinkFile.Add ('EXIT _LibCPostlude');
-  NLMConvLinkFile.Add ('CHECK _LibCCheckUnload');
-  {$else}
   NLMConvLinkFile.Add ('START _Prelude');  { defined in rtl/netware/nwpre.as }
   NLMConvLinkFile.Add ('EXIT _Stop');                             { nwpre.as }
   NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION');            { system.pp }
-  {$endif}
   
   if not (cs_link_strip in aktglobalswitches) then
   begin
@@ -396,9 +387,10 @@ begin
     Comment(V_Debug,'DEBUG');
   end;
 
-  { Write staticlibraries, is that correct ? }
+  { Write staticlibraries }
   if not StaticLibFiles.Empty then
    begin
+     LinkRes.Add ('GROUP(');
      While not StaticLibFiles.Empty do
       begin
         S:=lower (StaticLibFiles.GetFirst);
@@ -428,6 +420,7 @@ begin
          end;
         end
       end;
+      LinkRes.Add (')');
    end;
 
   if not SharedLibFiles.Empty then
@@ -473,13 +466,11 @@ begin
       end
      else
       { really, i think it is possible }
-      {Comment(V_Error,'Exporting of variables is not supported under netware');}
       Message1(parser_e_no_export_of_variables_for_target,'netware');
      hp2:=texported_item(hp2.next);
    end;
 
 { Write and Close response for ld, response for nlmconv is in NLMConvLinkFile(not written) }
-  linkres.Add (')');
   linkres.writetodisk;
   LinkRes.Free;
 
@@ -580,7 +571,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.16  2004-09-22 15:25:14  mazen
+  Revision 1.17  2004-09-24 10:48:31  armin
+  * added GROUP for .a files to linker script
+
+  Revision 1.16  2004/09/22 15:25:14  mazen
   * Fix error committing : previous version must be in branch USE_SYSUTILS
 
   Revision 1.14  2004/08/30 11:17:34  armin