Browse Source

* fixed compilation problems under x86

Jonas Maebe 21 years ago
parent
commit
6d4561ec58
1 changed files with 12 additions and 6 deletions
  1. 12 6
      compiler/systems/t_bsd.pas

+ 12 - 6
compiler/systems/t_bsd.pas

@@ -214,6 +214,7 @@ implementation
                       if not assigned(hp2.procdef) then
                       if not assigned(hp2.procdef) then
                         internalerror(2004010306);
                         internalerror(2004010306);
                       mangledstring := hp2.func^;
                       mangledstring := hp2.func^;
+{$ifdef powerpc}
                       if (po_public in hp2.procdef.procoptions) then
                       if (po_public in hp2.procdef.procoptions) then
                         begin
                         begin
                           importsSection.concat(Tai_section.Create(sec_code));
                           importsSection.concat(Tai_section.Create(sec_code));
@@ -221,7 +222,9 @@ implementation
                           mangledstring := '_$'+mangledstring;
                           mangledstring := '_$'+mangledstring;
                           importsSection.concat(taicpu.op_sym(A_B,objectlibrary.newasmsymbol(mangledstring)));
                           importsSection.concat(taicpu.op_sym(A_B,objectlibrary.newasmsymbol(mangledstring)));
                         end;
                         end;
-                        
+{$else powerpc}
+                      internalerror(2004010501);
+{$endif powerpc}
                       
                       
                       importsSection.concat(Tai_section.Create(sec_data));
                       importsSection.concat(Tai_section.Create(sec_data));
                       importsSection.concat(Tai_direct.create(strpnew('.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16')));
                       importsSection.concat(Tai_direct.create(strpnew('.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16')));
@@ -239,7 +242,7 @@ implementation
                          hp2.procdef.setmangledname(mangledstring);
                          hp2.procdef.setmangledname(mangledstring);
                        end;
                        end;
 {$EndIf GDB}
 {$EndIf GDB}
-{$ifdef CPUPOWERPC}
+{$ifdef powerpc}
                       href.symaddr := refs_ha;
                       href.symaddr := refs_ha;
                       importsSection.concat(taicpu.op_reg_ref(A_LIS,NR_R11,href));
                       importsSection.concat(taicpu.op_reg_ref(A_LIS,NR_R11,href));
                       href.symaddr := refs_l;
                       href.symaddr := refs_l;
@@ -247,9 +250,9 @@ implementation
                       importsSection.concat(taicpu.op_reg_ref(A_LWZU,NR_R12,href));
                       importsSection.concat(taicpu.op_reg_ref(A_LWZU,NR_R12,href));
                       importsSection.concat(taicpu.op_reg(A_MTCTR,NR_R12));
                       importsSection.concat(taicpu.op_reg(A_MTCTR,NR_R12));
                       importsSection.concat(taicpu.op_none(A_BCTR));
                       importsSection.concat(taicpu.op_none(A_BCTR));
-{$else CPUPOWERPC}
-{$error fixme for darwin x86}
-{$endif CPUPOWERPC}
+{$else powerpc}
+                      internalerror(2004010502);
+{$endif powerpc}
                       importsSection.concat(Tai_section.Create(sec_data));
                       importsSection.concat(Tai_section.Create(sec_data));
                       importsSection.concat(Tai_direct.create(strpnew('.lazy_symbol_pointer')));
                       importsSection.concat(Tai_direct.create(strpnew('.lazy_symbol_pointer')));
                       importsSection.concat(Tai_symbol.Create(l1,0));
                       importsSection.concat(Tai_symbol.Create(l1,0));
@@ -752,7 +755,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2004-01-04 21:26:31  jonas
+  Revision 1.7  2004-01-05 08:13:30  jonas
+    * fixed compilation problems under x86
+
+  Revision 1.6  2004/01/04 21:26:31  jonas
     + Darwin support for routines imported from external libraries (not yet
     + Darwin support for routines imported from external libraries (not yet
       ideal, we should generate stubs in all files where the routines are
       ideal, we should generate stubs in all files where the routines are
       used -> these are automatically merged by the linker; now we generate
       used -> these are automatically merged by the linker; now we generate