Browse Source

* fix import linking under linux

peter 22 years ago
parent
commit
dab938e084
2 changed files with 10 additions and 6 deletions
  1. 5 3
      compiler/pmodules.pas
  2. 5 3
      compiler/systems/t_os2.pas

+ 5 - 3
compiler/pmodules.pas

@@ -1101,8 +1101,7 @@ implementation
          if is_assembler_generated then
          if is_assembler_generated then
            insertobjectfile
            insertobjectfile
          else
          else
-           if not (current_module.uses_imports) then
-             current_module.flags:=current_module.flags or uf_no_link;
+           current_module.flags:=current_module.flags or uf_no_link;
 
 
          if cs_local_browser in aktmoduleswitches then
          if cs_local_browser in aktmoduleswitches then
            current_module.localsymtable:=refsymtable;
            current_module.localsymtable:=refsymtable;
@@ -1445,7 +1444,10 @@ So, all parameters are passerd into registers in sparc architecture.}
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.96  2003-02-19 22:00:14  daniel
+  Revision 1.97  2003-03-17 13:36:39  peter
+    * fix import linking under linux
+
+  Revision 1.96  2003/02/19 22:00:14  daniel
     * Code generator converted to new register notation
     * Code generator converted to new register notation
     - Horribily outdated todo.txt removed
     - Horribily outdated todo.txt removed
 
 

+ 5 - 3
compiler/systems/t_os2.pas

@@ -279,8 +279,7 @@ var
 begin
 begin
     libname:=FixFileName(s+'.ao2');
     libname:=FixFileName(s+'.ao2');
     seq_no:=1;
     seq_no:=1;
-    current_module.linkunitstaticlibs.add(libname,link_allways);
-    current_module.flags:=current_module.flags or uf_static_linked;
+    current_module.linkotherstaticlibs.add(libname,link_allways);
     assign(out_file,current_module.outputpath^+libname);
     assign(out_file,current_module.outputpath^+libname);
     rewrite(out_file,1);
     rewrite(out_file,1);
     blockwrite(out_file,ar_magic,sizeof(ar_magic));
     blockwrite(out_file,ar_magic,sizeof(ar_magic));
@@ -517,7 +516,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2002-12-01 16:19:16  carl
+  Revision 1.4  2003-03-17 13:36:39  peter
+    * fix import linking under linux
+
+  Revision 1.3  2002/12/01 16:19:16  carl
     * fix compilation problems
     * fix compilation problems
 
 
   Revision 1.2  2002/12/01 13:20:33  hajny
   Revision 1.2  2002/12/01 13:20:33  hajny