瀏覽代碼

* the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
framework, and inludes an interface to either the fragile or non-fragile
obj-c run time depending on the target platform
+ support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
are now also supported for the objectivec1 modeswitch
+ support for private_extern symbol bindings, required for the above
* mark objcclasses that are declared in the implementation section of a
unit as "hidden" (not sure what the effect is, since the Objective-C
runtime does not seem to do anything with this flag)
* enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -

Jonas Maebe 16 年之前
父節點
當前提交
0c675a4039
共有 66 個文件被更改,包括 1756 次插入336 次删除
  1. 3 1
      .gitattributes
  2. 18 3
      compiler/aasmbase.pas
  3. 7 4
      compiler/aasmtai.pas
  4. 119 7
      compiler/aggas.pas
  5. 1 1
      compiler/arm/cpunode.pas
  6. 11 2
      compiler/i386/ag386nsm.pas
  7. 47 3
      compiler/ncgmem.pas
  8. 5 1
      compiler/ncgrtti.pas
  9. 20 1
      compiler/nmem.pas
  10. 12 4
      compiler/nobjc.pas
  11. 892 151
      compiler/objcgutl.pas
  12. 18 5
      compiler/objcutil.pas
  13. 21 3
      compiler/ogbase.pas
  14. 11 2
      compiler/ogcoff.pas
  15. 22 4
      compiler/ogelf.pas
  16. 1 1
      compiler/pmodules.pas
  17. 34 25
      compiler/powerpc/agppcmpw.pas
  18. 1 0
      compiler/powerpc64/cpunode.pas
  19. 6 1
      compiler/pp.lpi
  20. 1 1
      compiler/ppcgen/cgppc.pas
  21. 2 2
      compiler/scanner.pas
  22. 4 1
      compiler/symconst.pas
  23. 60 12
      compiler/symdef.pas
  24. 19 0
      compiler/symsym.pas
  25. 6 0
      compiler/systems.pas
  26. 8 1
      compiler/x86/agx86att.pas
  27. 18 0
      compiler/x86/agx86int.pas
  28. 2 2
      compiler/x86/cgx86.pas
  29. 1 0
      compiler/x86_64/cpunode.pas
  30. 60 60
      rtl/darwin/Makefile
  31. 3 3
      rtl/darwin/Makefile.fpc
  32. 19 0
      rtl/inc/objc.pp
  33. 1 3
      rtl/inc/objc1.inc
  34. 268 0
      rtl/inc/objcnf.inc
  35. 1 1
      tests/test/tobjc1.pp
  36. 1 1
      tests/test/tobjc10.pp
  37. 1 1
      tests/test/tobjc11.pp
  38. 1 1
      tests/test/tobjc12.pp
  39. 1 1
      tests/test/tobjc13.pp
  40. 1 1
      tests/test/tobjc13a.pp
  41. 1 1
      tests/test/tobjc13b.pp
  42. 1 0
      tests/test/tobjc14.pp
  43. 1 1
      tests/test/tobjc15.pp
  44. 1 1
      tests/test/tobjc16.pp
  45. 1 1
      tests/test/tobjc17.pp
  46. 1 1
      tests/test/tobjc18.pp
  47. 1 1
      tests/test/tobjc19.pp
  48. 1 1
      tests/test/tobjc2.pp
  49. 1 1
      tests/test/tobjc20.pp
  50. 4 2
      tests/test/tobjc21.pp
  51. 1 1
      tests/test/tobjc22.pp
  52. 1 1
      tests/test/tobjc3.pp
  53. 1 1
      tests/test/tobjc4.pp
  54. 1 1
      tests/test/tobjc4a.pp
  55. 1 1
      tests/test/tobjc5.pp
  56. 1 1
      tests/test/tobjc5a.pp
  57. 1 1
      tests/test/tobjc6.pp
  58. 1 1
      tests/test/tobjc7.pp
  59. 1 1
      tests/test/tobjc7a.pp
  60. 1 1
      tests/test/tobjc7b.pp
  61. 1 1
      tests/test/tobjc7c.pp
  62. 1 1
      tests/test/tobjc8.pp
  63. 1 1
      tests/test/tobjc8a.pp
  64. 1 1
      tests/test/tobjc9.pp
  65. 1 1
      tests/test/tobjc9a.pp
  66. 1 1
      tests/test/tobjc9b.pp

+ 3 - 1
.gitattributes

@@ -6095,8 +6095,10 @@ rtl/inc/mmatimp.inc svneol=native#text/plain
 rtl/inc/mouse.inc svneol=native#text/plain
 rtl/inc/mouse.inc svneol=native#text/plain
 rtl/inc/mouseh.inc svneol=native#text/plain
 rtl/inc/mouseh.inc svneol=native#text/plain
 rtl/inc/mvecimp.inc svneol=native#text/plain
 rtl/inc/mvecimp.inc svneol=native#text/plain
-rtl/inc/objc1.pp svneol=native#text/plain
+rtl/inc/objc.pp svneol=native#text/plain
+rtl/inc/objc1.inc svneol=native#text/plain
 rtl/inc/objcbase.pp svneol=native#text/plain
 rtl/inc/objcbase.pp svneol=native#text/plain
+rtl/inc/objcnf.inc svneol=native#text/plain
 rtl/inc/objects.pp svneol=native#text/plain
 rtl/inc/objects.pp svneol=native#text/plain
 rtl/inc/objpas.inc svneol=native#text/plain
 rtl/inc/objpas.inc svneol=native#text/plain
 rtl/inc/objpash.inc svneol=native#text/plain
 rtl/inc/objpash.inc svneol=native#text/plain

+ 18 - 3
compiler/aasmbase.pas

@@ -37,7 +37,10 @@ interface
        ;
        ;
 
 
     type
     type
-       TAsmsymbind=(AB_NONE,AB_EXTERNAL,AB_COMMON,AB_LOCAL,AB_GLOBAL,AB_WEAK_EXTERNAL);
+       TAsmsymbind=(
+         AB_NONE,AB_EXTERNAL,AB_COMMON,AB_LOCAL,AB_GLOBAL,AB_WEAK_EXTERNAL,
+         { global in the current program/library, but not visible outside it }
+         AB_PRIVATE_EXTERN);
 
 
        TAsmsymtype=(
        TAsmsymtype=(
          AT_NONE,AT_FUNCTION,AT_DATA,AT_SECTION,AT_LABEL,
          AT_NONE,AT_FUNCTION,AT_DATA,AT_SECTION,AT_LABEL,
@@ -92,6 +95,7 @@ interface
          sec_toc,
          sec_toc,
          sec_init,
          sec_init,
          sec_fini,
          sec_fini,
+         {Objective-C common and fragile ABI }
          sec_objc_class,
          sec_objc_class,
          sec_objc_meta_class,
          sec_objc_meta_class,
          sec_objc_cat_cls_meth,
          sec_objc_cat_cls_meth,
@@ -116,7 +120,17 @@ interface
          sec_objc_property,
          sec_objc_property,
          sec_objc_image_info,
          sec_objc_image_info,
          sec_objc_cstring_object,
          sec_objc_cstring_object,
-         sec_objc_sel_fixup
+         sec_objc_sel_fixup,
+         { Objective-C non-fragile ABI }
+         sec_objc_data,
+         sec_objc_const,
+         sec_objc_sup_refs,
+         sec_data_coalesced,
+         sec_objc_classlist,
+         sec_objc_nlclasslist,
+         sec_objc_catlist,
+         sec_objc_nlcatlist,
+         sec_objc_protolist
        );
        );
 
 
        TAsmSectionOrder = (secorder_begin,secorder_default,secorder_end);
        TAsmSectionOrder = (secorder_begin,secorder_default,secorder_end);
@@ -390,7 +404,8 @@ implementation
         TAsmLabel(result).labeltype:=labeltype;
         TAsmLabel(result).labeltype:=labeltype;
         TAsmLabel(result).is_set:=false;
         TAsmLabel(result).is_set:=false;
         case bind of
         case bind of
-          AB_GLOBAL:
+          AB_GLOBAL,
+          AB_PRIVATE_EXTERN:
             result.increfs;
             result.increfs;
           AB_LOCAL:
           AB_LOCAL:
             ;
             ;

+ 7 - 4
compiler/aasmtai.pas

@@ -254,7 +254,8 @@ interface
       TAsmDirective=(
       TAsmDirective=(
         asd_non_lazy_symbol_pointer,asd_indirect_symbol,asd_lazy_symbol_pointer,
         asd_non_lazy_symbol_pointer,asd_indirect_symbol,asd_lazy_symbol_pointer,
         asd_extern,asd_nasm_import, asd_toc_entry, asd_mod_init_func, asd_mod_term_func,
         asd_extern,asd_nasm_import, asd_toc_entry, asd_mod_init_func, asd_mod_term_func,
-        asd_reference,asd_no_dead_strip,asd_weak_reference,asd_lazy_reference
+        asd_reference,asd_no_dead_strip,asd_weak_reference,asd_lazy_reference,
+        asd_weak_definition
       );
       );
 
 
     const
     const
@@ -264,7 +265,7 @@ interface
       directivestr : array[TAsmDirective] of string[23]=(
       directivestr : array[TAsmDirective] of string[23]=(
         'non_lazy_symbol_pointer','indirect_symbol','lazy_symbol_pointer',
         'non_lazy_symbol_pointer','indirect_symbol','lazy_symbol_pointer',
         'extern','nasm_import', 'tc', 'mod_init_func', 'mod_term_func', 'reference',
         'extern','nasm_import', 'tc', 'mod_init_func', 'mod_term_func', 'reference',
-        'no_dead_strip','weak_reference','lazy_reference'
+        'no_dead_strip','weak_reference','lazy_reference','weak_definition'
       );
       );
 
 
     type
     type
@@ -924,7 +925,9 @@ implementation
          typ:=ait_symbol;
          typ:=ait_symbol;
          sym:=_sym;
          sym:=_sym;
          size:=siz;
          size:=siz;
-         sym.bind:=AB_GLOBAL;
+         { don't override PRIVATE_EXTERN with GLOBAL }
+         if not(sym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN]) then
+           sym.bind:=AB_GLOBAL;
          is_global:=true;
          is_global:=true;
       end;
       end;
 
 
@@ -1518,7 +1521,7 @@ implementation
         typ:=ait_label;
         typ:=ait_label;
         labsym:=_labsym;
         labsym:=_labsym;
         labsym.is_set:=true;
         labsym.is_set:=true;
-        is_global:=(labsym.bind=AB_GLOBAL);
+        is_global:=(labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN]);
       end;
       end;
 
 
 
 

+ 119 - 7
compiler/aggas.pas

@@ -247,7 +247,7 @@ implementation
 
 
     function TGNUAssembler.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
     function TGNUAssembler.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
       const
       const
-        secnames : array[TAsmSectiontype] of string[length('.objc_meth_var_types')] = ('',
+        secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           '.text',
           '.text',
           '.data',
           '.data',
 { why doesn't .rodata work? (FK) }
 { why doesn't .rodata work? (FK) }
@@ -304,9 +304,18 @@ implementation
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
-        secnames_pic : array[TAsmSectiontype] of string[length('.objc_meth_var_types')] = ('',
+        secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           '.text',
           '.text',
           '.data.rel',
           '.data.rel',
           '.data.rel',
           '.data.rel',
@@ -348,7 +357,16 @@ implementation
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA, __objc_data',
+          '__DATA, __objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
       var
       var
         sep     : string[3];
         sep     : string[3];
@@ -422,7 +440,7 @@ implementation
          system_x86_64_darwin,
          system_x86_64_darwin,
          system_arm_darwin:
          system_arm_darwin:
            begin
            begin
-             if (atype = sec_stub) then
+             if (atype in [sec_stub,sec_objc_data,sec_objc_const,sec_data_coalesced]) then
                AsmWrite('.section ');
                AsmWrite('.section ');
            end
            end
          else
          else
@@ -990,7 +1008,12 @@ implementation
              begin
              begin
                if (tai_label(hp).labsym.is_used) then
                if (tai_label(hp).labsym.is_used) then
                 begin
                 begin
-                  if tai_label(hp).labsym.bind=AB_GLOBAL then
+                  if (tai_label(hp).labsym.bind=AB_PRIVATE_EXTERN) then
+                    begin
+                      AsmWrite(#9'.private_extern ');
+                      AsmWriteln(tai_label(hp).labsym.name);
+                    end;
+                  if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then
                    begin
                    begin
                      AsmWrite('.globl'#9);
                      AsmWrite('.globl'#9);
                      AsmWriteLn(tai_label(hp).labsym.name);
                      AsmWriteLn(tai_label(hp).labsym.name);
@@ -1002,6 +1025,11 @@ implementation
 
 
            ait_symbol :
            ait_symbol :
              begin
              begin
+               if (tai_symbol(hp).sym.bind=AB_PRIVATE_EXTERN) then
+                 begin
+                   AsmWrite(#9'.private_extern ');
+                   AsmWriteln(tai_symbol(hp).sym.name);
+                 end;
                if (target_info.system = system_powerpc64_linux) and
                if (target_info.system = system_powerpc64_linux) and
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in current_settings.moduleswitches) then
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in current_settings.moduleswitches) then
                  begin
                  begin
@@ -1294,6 +1322,81 @@ implementation
                 result:='.section __OBJC, __sel_fixup, regular, no_dead_strip';
                 result:='.section __OBJC, __sel_fixup, regular, no_dead_strip';
                 exit;
                 exit;
               end;
               end;
+            sec_objc_message_refs:
+              begin
+                if (target_info.system in system_objc_nfabi) then
+                  begin
+                    result:='.section __DATA, __objc_selrefs, literal_pointers, no_dead_strip';
+                    exit;
+                  end;
+              end;
+            sec_objc_cls_refs:
+              begin
+                if (target_info.system in system_objc_nfabi) then
+                  begin
+                    result:='.section __DATA, __objc_clsrefs, regular, no_dead_strip';
+                    exit;
+                  end;
+              end;
+            sec_objc_meth_var_names,
+            sec_objc_class_names:
+              begin
+                if (target_info.system in system_objc_nfabi) then
+                  begin
+                    result:='.cstring';
+                    exit
+                  end;
+              end;
+            sec_objc_inst_meth,
+            sec_objc_cls_meth,
+            sec_objc_cat_inst_meth,
+            sec_objc_cat_cls_meth:
+              begin
+                if (target_info.system in system_objc_nfabi) then
+                  begin
+                    result:='.section __DATA, __objc_const';
+                    exit;
+                  end;
+              end;
+            sec_objc_meta_class,
+            sec_objc_class:
+              begin
+                if (target_info.system in system_objc_nfabi) then
+                  begin
+                    result:='.section __DATA, __objc_data';
+                    exit;
+                  end;
+              end;
+            sec_objc_sup_refs:
+              begin
+                result:='.section __DATA, __objc_superrefs, regular, no_dead_strip';
+                exit
+              end;
+            sec_objc_classlist:
+              begin
+                result:='.section __DATA, __objc_classlist, regular, no_dead_strip';
+                exit
+              end;
+            sec_objc_nlclasslist:
+              begin
+                result:='.section __DATA, __objc_nlclasslist, regular, no_dead_strip';
+                exit
+              end;
+            sec_objc_catlist:
+              begin
+                result:='.section __DATA, __objc_catlist, regular, no_dead_strip';
+                exit
+              end;
+            sec_objc_nlcatlist:
+              begin
+                result:='.section __DATA, __objc_nlcatlist, regular, no_dead_strip';
+                exit
+              end;
+            sec_objc_protolist:
+              begin
+                result:='.section __DATA, __objc_protolist, coalesced, no_dead_strip';
+                exit;
+              end;
           end;
           end;
         result := inherited sectionname(atype,aname,aorder);
         result := inherited sectionname(atype,aname,aorder);
       end;
       end;
@@ -1370,7 +1473,16 @@ implementation
          sec_none (* sec_objc_property *),
          sec_none (* sec_objc_property *),
          sec_none (* sec_objc_image_info *),
          sec_none (* sec_objc_image_info *),
          sec_none (* sec_objc_cstring_object *),
          sec_none (* sec_objc_cstring_object *),
-         sec_none (* sec_objc_sel_fixup *)
+         sec_none (* sec_objc_sel_fixup *),
+         sec_none (* sec_objc_data *),
+         sec_none (* sec_objc_const *),
+         sec_none (* sec_objc_sup_refs *),
+         sec_none (* sec_data_coalesced *),
+         sec_none (* sec_objc_classlist *),
+         sec_none (* sec_objc_nlclasslist *),
+         sec_none (* sec_objc_catlist *),
+         sec_none (* sec_objc_nlcatlist *),
+         sec_none (* sec_objc_protlist *)
         );
         );
       begin
       begin
         Result := inherited SectionName (SecXTable [AType], AName, AOrder);
         Result := inherited SectionName (SecXTable [AType], AName, AOrder);

+ 1 - 1
compiler/arm/cpunode.pas

@@ -29,7 +29,7 @@ unit cpunode;
 
 
     uses
     uses
        { generic nodes }
        { generic nodes }
-       ncgbas,ncgld,ncgflw,ncgcnv,ncgmem,ncgcon,ncgcal,ncgset,ncginl,ncgopt,ncgmat,
+       ncgbas,ncgld,ncgflw,ncgcnv,ncgmem,ncgcon,ncgcal,ncgset,ncginl,ncgopt,ncgmat,ncgobjc,
        { to be able to only parts of the generic code,
        { to be able to only parts of the generic code,
          the processor specific nodes must be included
          the processor specific nodes must be included
          after the generic one (FK)
          after the generic one (FK)

+ 11 - 2
compiler/i386/ag386nsm.pas

@@ -446,7 +446,7 @@ interface
 
 
     procedure T386NasmAssembler.WriteSection(atype:TAsmSectiontype;const aname:string);
     procedure T386NasmAssembler.WriteSection(atype:TAsmSectiontype;const aname:string);
       const
       const
-        secnames : array[TAsmSectiontype] of string[length('.objc_meth_var_types')] = ('',
+        secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           '.text',
           '.text',
           '.data',
           '.data',
           '.data',
           '.data',
@@ -488,7 +488,16 @@ interface
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
       begin
       begin
         AsmLn;
         AsmLn;

+ 47 - 3
compiler/ncgmem.pas

@@ -114,12 +114,20 @@ implementation
                end
                end
              else
              else
                begin
                begin
-                 { find/add necessary classref/classname pool entries }
                  if current_asmdata.ConstPools[sp_objcclassnamerefs]=nil then
                  if current_asmdata.ConstPools[sp_objcclassnamerefs]=nil then
                    current_asmdata.ConstPools[sp_objcclassnamerefs]:=THashSet.Create(64, True, False);
                    current_asmdata.ConstPools[sp_objcclassnamerefs]:=THashSet.Create(64, True, False);
                  pool:=current_asmdata.ConstPools[sp_objcclassnamerefs];
                  pool:=current_asmdata.ConstPools[sp_objcclassnamerefs];
                  entry:=pool.FindOrAdd(@tobjectdef(left.resultdef).objextname^[1],length(tobjectdef(left.resultdef).objextname^));
                  entry:=pool.FindOrAdd(@tobjectdef(left.resultdef).objextname^[1],length(tobjectdef(left.resultdef).objextname^));
-                 objcfinishstringrefpoolentry(entry,sp_objcclassnames,sec_objc_cls_refs,sec_objc_class_names);
+                 if (target_info.system in system_objc_nfabi) then
+                   begin
+                     { find/add necessary classref/classname pool entries }
+                     objcfinishclassrefnfpoolentry(entry,tobjectdef(left.resultdef));
+                   end
+                 else
+                   begin
+                     { find/add necessary classref/classname pool entries }
+                     objcfinishstringrefpoolentry(entry,sp_objcclassnames,sec_objc_cls_refs,sec_objc_class_names);
+                   end;
                  reference_reset_symbol(href,tasmlabel(entry^.Data),0,sizeof(pint));
                  reference_reset_symbol(href,tasmlabel(entry^.Data),0,sizeof(pint));
                  cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,location.register);
                  cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,location.register);
                end;
                end;
@@ -265,7 +273,10 @@ implementation
 
 
     procedure tcgsubscriptnode.pass_generate_code;
     procedure tcgsubscriptnode.pass_generate_code;
       var
       var
+        sym: tasmsymbol;
         paraloc1 : tcgpara;
         paraloc1 : tcgpara;
+        hreg  : tregister;
+        tmpref: treference;
         sref: tsubsetreference;
         sref: tsubsetreference;
       begin
       begin
          secondpass(left);
          secondpass(left);
@@ -298,6 +309,8 @@ implementation
                      location.reference.base:=cg.getaddressregister(current_asmdata.CurrAsmList);
                      location.reference.base:=cg.getaddressregister(current_asmdata.CurrAsmList);
                      cg.a_load_loc_reg(current_asmdata.CurrAsmList,OS_ADDR,left.location,location.reference.base);
                      cg.a_load_loc_reg(current_asmdata.CurrAsmList,OS_ADDR,left.location,location.reference.base);
                   end;
                   end;
+                else
+                  internalerror(2009092401);
              end;
              end;
              { implicit deferencing }
              { implicit deferencing }
              if (cs_use_heaptrc in current_settings.globalswitches) and
              if (cs_use_heaptrc in current_settings.globalswitches) and
@@ -399,7 +412,38 @@ implementation
              end;
              end;
            end;
            end;
 
 
-         if (location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
+         if is_objc_class_or_protocol(left.resultdef) and
+            (target_info.system in system_objc_nfabi) then
+           begin
+             if (location.loc<>LOC_REFERENCE) or
+                (location.reference.index<>NR_NO) then
+               internalerror(2009092402);
+             { the actual field offset is stored in memory (to solve the
+               "fragile base class" problem: this way the layout of base
+               classes can be changed without breaking programs compiled against
+               earlier versions)
+             }
+             hreg:=cg.g_indirect_sym_load(current_asmdata.CurrAsmList,vs.mangledname,false);
+             { TODO: clean up. g_indirect_sym_load cannot perform
+                 a plain load for targets that don't need an indirect load
+                 because it's also used in ncgld, but this is not very nice...
+             }
+             if (hreg=NR_NO) then
+               begin
+                 sym:=current_asmdata.RefAsmSymbol(vs.mangledname);
+                 reference_reset_symbol(tmpref,sym,0,sizeof(pint));
+                 location.reference.index:=cg.getaddressregister(current_asmdata.CurrAsmList);
+               end
+             else
+               begin
+                 reference_reset_base(tmpref,hreg,0,sizeof(pint));
+                 location.reference.index:=hreg;
+               end;
+             cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,tmpref,location.reference.index);
+             { always packrecords C -> natural alignment }
+             location.reference.alignment:=vs.vardef.alignment;
+           end
+         else if (location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
            begin
            begin
              if not is_packed_record_or_object(left.resultdef) then
              if not is_packed_record_or_object(left.resultdef) then
                begin
                begin

+ 5 - 1
compiler/ncgrtti.pas

@@ -73,7 +73,11 @@ implementation
 
 
 
 
     const
     const
-       rttidefstate : array[trttitype] of tdefstate = (ds_rtti_table_written,ds_init_table_written);
+       rttidefstate : array[trttitype] of tdefstate =
+         (ds_rtti_table_written,ds_init_table_written,
+         { Objective-C related, does not pass here }
+         symconst.ds_none,symconst.ds_none,
+         symconst.ds_none,symconst.ds_none);
 
 
     type
     type
        TPropNameListItem = class(TFPHashObject)
        TPropNameListItem = class(TFPHashObject)

+ 20 - 1
compiler/nmem.pas

@@ -167,11 +167,30 @@ implementation
 
 
 
 
     function tloadvmtaddrnode.pass_1 : tnode;
     function tloadvmtaddrnode.pass_1 : tnode;
+      var
+        vs: tsym;
       begin
       begin
          result:=nil;
          result:=nil;
          expectloc:=LOC_REGISTER;
          expectloc:=LOC_REGISTER;
          if left.nodetype<>typen then
          if left.nodetype<>typen then
-           firstpass(left)
+           begin
+             { make sure that the isa field is loaded correctly in case
+               of the non-fragile ABI }
+             if is_objcclass(left.resultdef) and
+                (left.nodetype<>typen) then
+               begin
+                 vs:=search_class_member(tobjectdef(left.resultdef),'ISA');
+                 if not assigned(vs) or
+                    (tsym(vs).typ<>fieldvarsym) then
+                   internalerror(2009092502);
+                 result:=csubscriptnode.create(tfieldvarsym(vs),left);
+                 inserttypeconv_internal(result,resultdef);
+                 { reused }
+                 left:=nil;
+               end
+             else
+               firstpass(left)
+           end
          else if not is_objcclass(left.resultdef) and
          else if not is_objcclass(left.resultdef) and
                  not is_objcclassref(left.resultdef) then
                  not is_objcclassref(left.resultdef) then
            begin
            begin

+ 12 - 4
compiler/nobjc.pas

@@ -67,7 +67,7 @@ implementation
 
 
 uses
 uses
   sysutils,
   sysutils,
-  globtype,cclasses,
+  globtype,cclasses,systems,
   verbose,pass_1,
   verbose,pass_1,
   defutil,
   defutil,
   symtype,symtable,symdef,symconst,symsym,
   symtype,symtable,symdef,symconst,symsym,
@@ -162,7 +162,7 @@ function tobjcprotocolnode.pass_typecheck: tnode;
 
 
 function tobjcprotocolnode.pass_1: tnode;
 function tobjcprotocolnode.pass_1: tnode;
   begin
   begin
-    result:=ccallnode.createinternresfromunit('OBJC1','OBJC_GETPROTOCOL',
+    result:=ccallnode.createinternresfromunit('OBJC','OBJC_GETPROTOCOL',
       ccallparanode.create(cstringconstnode.createstr(tobjectdef(left.resultdef).objextname^),nil),
       ccallparanode.create(cstringconstnode.createstr(tobjectdef(left.resultdef).objextname^),nil),
       resultdef
       resultdef
     );
     );
@@ -281,6 +281,10 @@ function tobjcmessagesendnode.pass_1: tnode;
         respara.free;
         respara.free;
         if not(cnf_inherited in tcallnode(left).callnodeflags) then
         if not(cnf_inherited in tcallnode(left).callnodeflags) then
           msgsendname:='OBJC_MSGSEND_STRET'
           msgsendname:='OBJC_MSGSEND_STRET'
+{$if defined(onlymacosx10_6) or defined(arm) }
+        else if (target_info.system in system_objc_nfabi) then
+          msgsendname:='OBJC_MSGSENDSUPER2_STRET'
+{$endif onlymacosx10_6 or arm}
         else
         else
           msgsendname:='OBJC_MSGSENDSUPER_STRET'
           msgsendname:='OBJC_MSGSENDSUPER_STRET'
       end
       end
@@ -293,6 +297,10 @@ function tobjcmessagesendnode.pass_1: tnode;
     { default }
     { default }
     else if not(cnf_inherited in tcallnode(left).callnodeflags) then
     else if not(cnf_inherited in tcallnode(left).callnodeflags) then
       msgsendname:='OBJC_MSGSEND'
       msgsendname:='OBJC_MSGSEND'
+{$if defined(onlymacosx10_6) or defined(arm) }
+    else if (target_info.system in system_objc_nfabi) then
+      msgsendname:='OBJC_MSGSENDSUPER2'
+{$endif onlymacosx10_6 or arm}
     else
     else
       msgsendname:='OBJC_MSGSENDSUPER';
       msgsendname:='OBJC_MSGSENDSUPER';
 
 
@@ -304,7 +312,7 @@ function tobjcmessagesendnode.pass_1: tnode;
     if (cnf_inherited in tcallnode(left).callnodeflags) then
     if (cnf_inherited in tcallnode(left).callnodeflags) then
       begin
       begin
          block:=internalstatements(statements);
          block:=internalstatements(statements);
-         objcsupertype:=search_named_unit_globaltype('OBJC1','OBJC_SUPER').typedef;
+         objcsupertype:=search_named_unit_globaltype('OBJC','OBJC_SUPER').typedef;
          if (objcsupertype.typ<>recorddef) then
          if (objcsupertype.typ<>recorddef) then
            internalerror(2009032901);
            internalerror(2009032901);
          { temp for the for the objc_super record }
          { temp for the for the objc_super record }
@@ -379,7 +387,7 @@ function tobjcmessagesendnode.pass_1: tnode;
     { methodpointer is also reused }
     { methodpointer is also reused }
     tcallnode(left).methodpointer:=nil;
     tcallnode(left).methodpointer:=nil;
     { and now the call to the Objective-C rtl }
     { and now the call to the Objective-C rtl }
-    result:=ccallnode.createinternresfromunit('OBJC1',msgsendname,newparas,left.resultdef);
+    result:=ccallnode.createinternresfromunit('OBJC',msgsendname,newparas,left.resultdef);
     { record whether or not the function result is used (remains
     { record whether or not the function result is used (remains
       the same for the new call).
       the same for the new call).
     }
     }

文件差異過大導致無法顯示
+ 892 - 151
compiler/objcgutl.pas


+ 18 - 5
compiler/objcutil.pas

@@ -58,10 +58,11 @@ implementation
       globtype,
       globtype,
       cutils,cclasses,
       cutils,cclasses,
       pass_1,
       pass_1,
-      verbose,
+      verbose,systems,
       symtable,symconst,symsym,
       symtable,symconst,symsym,
       defutil,paramgr,
       defutil,paramgr,
-      nbas,nmem,ncal,nld,ncon;
+      nbas,nmem,ncal,nld,ncon,
+      export;
 
 
 
 
 {******************************************************************
 {******************************************************************
@@ -127,11 +128,23 @@ end;
         if is_objcclassref(def) then
         if is_objcclassref(def) then
           begin
           begin
             para:=ccallparanode.create(cstringconstnode.createstr(tobjectdef(tclassrefdef(def).pointeddef).objextname^),nil);
             para:=ccallparanode.create(cstringconstnode.createstr(tobjectdef(tclassrefdef(def).pointeddef).objextname^),nil);
-            para:=ccallparanode.create(ccallnode.createinternfromunit('OBJC1','OBJC_GETMETACLASS',para),nil);
+            result:=ccallnode.createinternfromunit('OBJC','OBJC_GETMETACLASS',para);
           end
           end
         else
         else
-          para:=ccallparanode.create(cloadvmtaddrnode.create(ctypenode.create(def)),nil);
-        result:=ccallnode.createinternfromunit('OBJC1','CLASS_GETSUPERCLASS',para);
+          result:=cloadvmtaddrnode.create(ctypenode.create(def));
+
+{$if defined(onlymacosx10_6) or defined(arm) }
+        { For the non-fragile ABI, the superclass send2 method itself loads the
+          superclass. For the fragile ABI, we have to do this ourselves. 
+
+          NOTE: those send2 methods are only available on Mac OS X 10.6 and later!
+            (but on also all iPhone SDK revisions we support) }
+        if not(target_info.system in system_objc_nfabi) then
+{$endif onlymacosx10_6 or arm}
+          begin
+            para:=ccallparanode.create(result,nil);
+            result:=ccallnode.createinternfromunit('OBJC','CLASS_GETSUPERCLASS',para);
+          end;
         typecheckpass(result);
         typecheckpass(result);
       end;
       end;
 
 

+ 21 - 3
compiler/ogbase.pas

@@ -811,7 +811,7 @@ implementation
 
 
     function TObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
     function TObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
       const
       const
-        secnames : array[TAsmSectiontype] of string[length('objc_meth_var_names')] = ('',
+        secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           'code',
           'code',
           'Data',
           'Data',
           'Data',
           'Data',
@@ -852,7 +852,16 @@ implementation
           'objc_property',
           'objc_property',
           'objc_image_info',
           'objc_image_info',
           'objc_cstring_object',
           'objc_cstring_object',
-          'objc_sel_fixup'
+          'objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
       var
       var
         sep : string[3];
         sep : string[3];
@@ -928,7 +937,16 @@ implementation
           {objc_property} [oso_data,oso_load],
           {objc_property} [oso_data,oso_load],
           {objc_image_info} [oso_data,oso_load],
           {objc_image_info} [oso_data,oso_load],
           {objc_cstring_object} [oso_data,oso_load],
           {objc_cstring_object} [oso_data,oso_load],
-          {objc_sel_fixup} [oso_data,oso_load]
+          {objc_sel_fixup} [oso_data,oso_load],
+          {sec_objc_data} [oso_data,oso_load],
+          {sec_objc_const} [oso_data,oso_load],
+          {sec_objc_sup_refs} [oso_data,oso_load],
+          {sec_data_coalesced} [oso_data,oso_load],
+          {sec_objc_classlist} [oso_data,oso_load],
+          {sec_objc_nlclasslist} [oso_data,oso_load],
+          {sec_objc_catlist} [oso_data,oso_load],
+          {sec_objc_nlcatlist} [oso_data,oso_load],
+          {sec_objc_protolist'} [oso_data,oso_load]
         );
         );
       begin
       begin
         result:=secoptions[atype];
         result:=secoptions[atype];

+ 11 - 2
compiler/ogcoff.pas

@@ -479,7 +479,7 @@ implementation
        SymbolMaxGrow = 200*sizeof(coffsymbol);
        SymbolMaxGrow = 200*sizeof(coffsymbol);
        StrsMaxGrow   = 8192;
        StrsMaxGrow   = 8192;
 
 
-       coffsecnames : array[TAsmSectiontype] of string[20] = ('',
+       coffsecnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           '.text','.data','.data','.data','.bss','.tls',
           '.text','.data','.data','.data','.bss','.tls',
           '.text',
           '.text',
           '.pdata',
           '.pdata',
@@ -515,7 +515,16 @@ implementation
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
 
 
 const go32v2stub : array[0..2047] of byte=(
 const go32v2stub : array[0..2047] of byte=(

+ 22 - 4
compiler/ogelf.pas

@@ -569,7 +569,7 @@ implementation
 
 
     function TElfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
     function TElfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
       const
       const
-        secnames : array[TAsmSectiontype] of string[length('.objc_meth_var_types')] = ('',
+        secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
 {$ifdef userodata}
 {$ifdef userodata}
           '.text','.data','.data','.rodata','.bss','.threadvar',
           '.text','.data','.data','.rodata','.bss','.threadvar',
 {$else userodata}
 {$else userodata}
@@ -609,9 +609,18 @@ implementation
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
-        secnames_pic : array[TAsmSectiontype] of string[length('.objc_meth_var_types')] = ('',
+        secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
           '.text',
           '.text',
           '.data.rel',
           '.data.rel',
           '.data.rel',
           '.data.rel',
@@ -653,7 +662,16 @@ implementation
           '.objc_property',
           '.objc_property',
           '.objc_image_info',
           '.objc_image_info',
           '.objc_cstring_object',
           '.objc_cstring_object',
-          '.objc_sel_fixup'
+          '.objc_sel_fixup',
+          '__DATA,__objc_data',
+          '__DATA,__objc_const',
+          '.objc_superrefs',
+          '__DATA, __datacoal_nt,coalesced',
+          '.objc_classlist',
+          '.objc_nlclasslist',
+          '.objc_catlist',
+          '.obcj_nlcatlist',
+          '.objc_protolist'
         );
         );
       var
       var
         sep : string[3];
         sep : string[3];

+ 1 - 1
compiler/pmodules.pas

@@ -590,7 +590,7 @@ implementation
         if (m_objectivec1 in current_settings.modeswitches) then
         if (m_objectivec1 in current_settings.modeswitches) then
           begin
           begin
             { interface to Objective-C run time }
             { interface to Objective-C run time }
-            AddUnit('objc1');
+            AddUnit('objc');
             loadobjctypes;
             loadobjctypes;
             { NSObject }
             { NSObject }
             if not(current_module.is_unit) or
             if not(current_module.is_unit) or

+ 34 - 25
compiler/powerpc/agppcmpw.pas

@@ -77,31 +77,40 @@ interface
         'csect', {bss} 'csect', '',
         'csect', {bss} 'csect', '',
         'csect','csect','csect','csect',
         'csect','csect','csect','csect',
          '','','','','','','','','','','','','','',
          '','','','','','','','','','','','','','',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         '',
-         ''
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        ''
       );
       );
 
 
     type
     type

+ 1 - 0
compiler/powerpc64/cpunode.pas

@@ -30,6 +30,7 @@ implementation
 uses
 uses
   { generic nodes }
   { generic nodes }
   ncgbas, ncgld, ncgflw, ncgcnv, ncgmem, ncgcon, ncgcal, ncgset, ncginl, ncgopt,
   ncgbas, ncgld, ncgflw, ncgcnv, ncgmem, ncgcon, ncgcal, ncgset, ncginl, ncgopt,
+  ncgobjc,
   { to be able to only parts of the generic code,
   { to be able to only parts of the generic code,
     the processor specific nodes must be included
     the processor specific nodes must be included
     after the generic one (FK)
     after the generic one (FK)

+ 6 - 1
compiler/pp.lpi

@@ -26,7 +26,7 @@
         <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
         <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
       </local>
       </local>
     </RunParams>
     </RunParams>
-    <Units Count="2">
+    <Units Count="3">
       <Unit0>
       <Unit0>
         <Filename Value="pp.pas"/>
         <Filename Value="pp.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
@@ -37,6 +37,11 @@
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="aasmcpu"/>
         <UnitName Value="aasmcpu"/>
       </Unit1>
       </Unit1>
+      <Unit2>
+        <Filename Value="i386\cpupara.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cpupara"/>
+      </Unit2>
     </Units>
     </Units>
   </ProjectOptions>
   </ProjectOptions>
   <CompilerOptions>
   <CompilerOptions>

+ 1 - 1
compiler/ppcgen/cgppc.pas

@@ -785,7 +785,7 @@ unit cgppc;
           begin
           begin
             if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
             if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
                ((cs_create_pic in current_settings.moduleswitches) and
                ((cs_create_pic in current_settings.moduleswitches) and
-                (ref.symbol.bind in [AB_COMMON,AB_GLOBAL])) then
+                (ref.symbol.bind in [AB_COMMON,AB_GLOBAL,AB_PRIVATE_EXTERN])) then
               begin
               begin
                 tmpreg := g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL);
                 tmpreg := g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL);
                 ref.symbol:=nil;
                 ref.symbol:=nil;

+ 2 - 2
compiler/scanner.pas

@@ -453,9 +453,9 @@ implementation
               }
               }
               if doinclude and
               if doinclude and
                  (i=m_objectivec1) and
                  (i=m_objectivec1) and
-                 not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+                 not(target_info.system in system_objc_supported) then
                 begin
                 begin
-                  Message1(option_unsupported_target_for_feature,'Objective-C 1.0');
+                  Message1(option_unsupported_target_for_feature,'Objective-C');
                   break;
                   break;
                 end;
                 end;
 
 

+ 4 - 1
compiler/symconst.pas

@@ -452,7 +452,10 @@ type
 
 
   { RTTI information to store }
   { RTTI information to store }
   trttitype = (
   trttitype = (
-    fullrtti,initrtti
+    fullrtti,initrtti,
+    { Objective-C }
+    objcmetartti,objcmetarortti,
+    objcclassrtti,objcclassrortti
   );
   );
 
 
   { The order is from low priority to high priority,
   { The order is from low priority to high priority,

+ 60 - 12
compiler/symdef.pas

@@ -2103,7 +2103,7 @@ implementation
         if (tobjectdef(pointeddef).objecttype<>odt_objcclass) then
         if (tobjectdef(pointeddef).objecttype<>odt_objcclass) then
           result:=inherited rtti_mangledname(rt)
           result:=inherited rtti_mangledname(rt)
         else
         else
-          result:=target_asm.labelprefix+'_OBJC_METACLASS_'+tobjectdef(pointeddef).objextname^;
+          result:=tobjectdef(pointeddef).rtti_mangledname(objcmetartti);
       end;
       end;
 
 
 
 
@@ -4318,10 +4318,63 @@ implementation
 
 
     function tobjectdef.rtti_mangledname(rt: trttitype): string;
     function tobjectdef.rtti_mangledname(rt: trttitype): string;
       begin
       begin
-        if (objecttype<>odt_objcclass) then
+        if not(objecttype in [odt_objcclass,odt_objcprotocol]) then
           result:=inherited rtti_mangledname(rt)
           result:=inherited rtti_mangledname(rt)
         else
         else
-          result:=target_asm.labelprefix+'_OBJC_CLASS_'+objextname^;
+          begin
+            if not(target_info.system in system_objc_nfabi) then
+              begin
+                result:=target_asm.labelprefix;
+                case objecttype of
+                  odt_objcclass:
+                    begin
+                      case rt of
+                        objcclassrtti:
+                          result:=result+'_OBJC_CLASS_';
+                        objcmetartti:
+                          result:=result+'_OBJC_METACLASS_';
+                        else
+                         internalerror(2009092302);
+                      end;
+                    end;
+                  odt_objcprotocol:
+                    result:=result+'_OBJC_PROTOCOL_';
+                end;
+              end
+            else
+              begin
+                case objecttype of
+                  odt_objcclass:
+                    begin
+                      case rt of
+                        objcclassrtti:
+                          result:='_OBJC_CLASS_$_';
+                        objcmetartti:
+                          result:='_OBJC_METACLASS_$_';
+                        objcclassrortti:
+                          result:=lower(target_asm.labelprefix)+'_OBJC_CLASS_RO_$_';
+                        objcmetarortti:
+                          result:=lower(target_asm.labelprefix)+'_OBJC_METACLASS_RO_$_';
+                        else
+                         internalerror(2009092303);
+                      end;
+                    end;
+                  odt_objcprotocol:
+                    begin
+                      result:=lower(target_asm.labelprefix);
+                      case rt of
+                        objcclassrtti:
+                          result:=result+'_OBJC_PROTOCOL_$_';
+                        objcmetartti:
+                          result:=result+'_OBJC_LABEL_PROTOCOL_$_';
+                        else
+                          internalerror(2009092501);
+                      end;
+                    end;
+                end;
+              end;
+            result:=result+objextname^;
+          end;
       end;
       end;
 
 
 
 
@@ -4616,11 +4669,6 @@ implementation
     function TImplementedInterface.getcopy:TImplementedInterface;
     function TImplementedInterface.getcopy:TImplementedInterface;
       begin
       begin
         Result:=TImplementedInterface.Create(nil);
         Result:=TImplementedInterface.Create(nil);
-        {$warning: this is completely wrong on so many levels...}
-        { 1) the procdefs list will be freed once for each copy
-          2) since the procdefs list owns its elements, those will also be freed for each copy
-          3) idem for the name mappings
-        }
         Move(pointer(self)^,pointer(result)^,InstanceSize);
         Move(pointer(self)^,pointer(result)^,InstanceSize);
       end;
       end;
 
 
@@ -4857,10 +4905,10 @@ implementation
 
 
     procedure loadobjctypes;
     procedure loadobjctypes;
       begin
       begin
-        objc_metaclasstype:=tpointerdef(search_named_unit_globaltype('OBJC1','POBJC_CLASS').typedef);
-        objc_superclasstype:=tpointerdef(search_named_unit_globaltype('OBJC1','POBJC_SUPER').typedef);
-        objc_idtype:=tpointerdef(search_named_unit_globaltype('OBJC1','ID').typedef);
-        objc_seltype:=tpointerdef(search_named_unit_globaltype('OBJC1','SEL').typedef);
+        objc_metaclasstype:=tpointerdef(search_named_unit_globaltype('OBJC','POBJC_CLASS').typedef);
+        objc_superclasstype:=tpointerdef(search_named_unit_globaltype('OBJC','POBJC_SUPER').typedef);
+        objc_idtype:=tpointerdef(search_named_unit_globaltype('OBJC','ID').typedef);
+        objc_seltype:=tpointerdef(search_named_unit_globaltype('OBJC','SEL').typedef);
       end;
       end;
 
 
 
 

+ 19 - 0
compiler/symsym.pas

@@ -147,10 +147,12 @@ interface
 
 
       tfieldvarsym = class(tabstractvarsym)
       tfieldvarsym = class(tabstractvarsym)
           fieldoffset   : aint;   { offset in record/object }
           fieldoffset   : aint;   { offset in record/object }
+          objcoffsetmangledname: pshortstring; { mangled name of offset, calculated as needed }
           constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
           constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function mangledname:string;override;
           function mangledname:string;override;
+          destructor destroy;override;
       end;
       end;
 
 
       tabstractnormalvarsym = class(tabstractvarsym)
       tabstractnormalvarsym = class(tabstractvarsym)
@@ -1098,11 +1100,28 @@ implementation
             else
             else
               internalerror(2007012501);
               internalerror(2007012501);
           end
           end
+        else if is_objcclass(tdef(owner.defowner)) then
+          begin
+            if assigned(objcoffsetmangledname) then
+              result:=objcoffsetmangledname^
+            else
+              begin
+                result:=target_info.cprefix+'OBJC_IVAR_$_'+tobjectdef(owner.defowner).objextname^+'.'+RealName;
+                objcoffsetmangledname:=stringdup(result);
+              end;
+          end
         else
         else
           result:=inherited mangledname;
           result:=inherited mangledname;
       end;
       end;
 
 
 
 
+    destructor tfieldvarsym.destroy;
+      begin
+        stringdispose(objcoffsetmangledname);
+        inherited destroy;
+      end;
+
+
 {****************************************************************************
 {****************************************************************************
                         TABSTRACTNORMALVARSYM
                         TABSTRACTNORMALVARSYM
 ****************************************************************************}
 ****************************************************************************}

+ 6 - 0
compiler/systems.pas

@@ -403,6 +403,12 @@ interface
                          system_powerpc64_darwin,system_x86_64_darwin,
                          system_powerpc64_darwin,system_x86_64_darwin,
                          system_arm_darwin];
                          system_arm_darwin];
 
 
+       { systems supporting Objective-C }
+       system_objc_supported = systems_darwin;
+
+       { systems using the non-fragile Objective-C ABI }
+       system_objc_nfabi = [system_powerpc64_darwin,system_x86_64_darwin,system_arm_darwin];
+
        { all embedded systems }
        { all embedded systems }
        systems_embedded = [system_i386_embedded,system_m68k_embedded,
        systems_embedded = [system_i386_embedded,system_m68k_embedded,
                            system_alpha_embedded,system_powerpc_embedded,
                            system_alpha_embedded,system_powerpc_embedded,

+ 8 - 1
compiler/x86/agx86att.pas

@@ -117,7 +117,14 @@ interface
              owner.AsmWrite('-'+relsymbol.name);
              owner.AsmWrite('-'+relsymbol.name);
            if ref.refaddr=addr_pic then
            if ref.refaddr=addr_pic then
 {$ifdef x86_64}
 {$ifdef x86_64}
-             owner.AsmWrite('@GOTPCREL');
+             begin
+               { local symbols don't have to (and in case of Mac OS X: cannot)
+                 be accessed via the GOT
+               }
+               if not assigned(ref.symbol) or
+                  (ref.symbol.bind<>AB_LOCAL) then
+                 owner.AsmWrite('@GOTPCREL');
+             end;
 {$else x86_64}
 {$else x86_64}
              owner.AsmWrite('@GOT');
              owner.AsmWrite('@GOT');
 {$endif x86_64}
 {$endif x86_64}

+ 18 - 0
compiler/x86/agx86int.pas

@@ -93,6 +93,15 @@ implementation
         '',
         '',
         '',
         '',
         '',
         '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
         ''
         ''
       );
       );
 
 
@@ -130,6 +139,15 @@ implementation
         '',
         '',
         '',
         '',
         '',
         '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
+        '',
         ''
         ''
       );
       );
 
 

+ 2 - 2
compiler/x86/cgx86.pas

@@ -481,7 +481,7 @@ unit cgx86;
              begin
              begin
                if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
                if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
                   ((cs_create_pic in current_settings.moduleswitches) and
                   ((cs_create_pic in current_settings.moduleswitches) and
-                   (ref.symbol.bind in [AB_COMMON,AB_GLOBAL])) then
+                   (ref.symbol.bind in [AB_COMMON,AB_GLOBAL,AB_PRIVATE_EXTERN])) then
                  begin
                  begin
                    hreg:=g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL);
                    hreg:=g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL);
                    ref.symbol:=nil;
                    ref.symbol:=nil;
@@ -890,7 +890,7 @@ unit cgx86;
                       begin
                       begin
                         if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
                         if (ref.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
                            ((cs_create_pic in current_settings.moduleswitches) and
                            ((cs_create_pic in current_settings.moduleswitches) and
-                            (ref.symbol.bind in [AB_COMMON,AB_GLOBAL])) then
+                            (ref.symbol.bind in [AB_COMMON,AB_GLOBAL,AB_PRIVATE_EXTERN])) then
                           begin
                           begin
                              reference_reset_base(tmpref,
                              reference_reset_base(tmpref,
                                g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL),
                                g_indirect_sym_load(list,ref.symbol.name,ref.symbol.bind=AB_WEAK_EXTERNAL),

+ 1 - 0
compiler/x86_64/cpunode.pas

@@ -42,6 +42,7 @@ unit cpunode;
        ncgcal,
        ncgcal,
        ncgset,
        ncgset,
        ncgopt,
        ncgopt,
+       ncgobjc,
        // n386con,n386flw,n386mat,n386mem,
        // n386con,n386flw,n386mat,n386mem,
        // n386set,n386inl,n386opt,
        // n386set,n386inl,n386opt,
        { the cpu specific node units must be used after the generic ones to
        { the cpu specific node units must be used after the generic ones to

+ 60 - 60
rtl/darwin/Makefile

@@ -297,178 +297,178 @@ ifndef USELIBGGI
 USELIBGGI=NO
 USELIBGGI=NO
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc objcbase
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_IMPLICITUNITS+=exeinfo
 override TARGET_IMPLICITUNITS+=exeinfo
@@ -2457,8 +2457,8 @@ dateutils$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) sysutils$(PPUEXT) mat
 strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
 strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
 		   $(SYSTEMUNIT)$(PPUEXT)
 		   $(SYSTEMUNIT)$(PPUEXT)
-objc1$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc1.pp
-objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc1$(PPUEXT)
+objc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc.pp $(INC)/objc1.inc $(INC)/objcnf.inc
+objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc$(PPUEXT)
 baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
 baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
   signal.inc $(UNIXINC)/bunxh.inc \
   signal.inc $(UNIXINC)/bunxh.inc \
   $(BSDINC)/bunxsysc.inc \
   $(BSDINC)/bunxsysc.inc \

+ 3 - 3
rtl/darwin/Makefile.fpc

@@ -16,7 +16,7 @@ units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixut
       errors ipc terminfo termio video crt mouse keyboard console \
       errors ipc terminfo termio video crt mouse keyboard console \
       variants dateutils convutils stdconvs \
       variants dateutils convutils stdconvs \
       sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd \
       sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd \
-      fpintres fpextres clocale objc1 objcbase
+      fpintres fpextres clocale objc objcbase
 implicitunits=exeinfo
 implicitunits=exeinfo
 
 
 rsts=math varutils typinfo classes variants dateutils sysconst rtlconsts
 rsts=math varutils typinfo classes variants dateutils sysconst rtlconsts
@@ -136,9 +136,9 @@ strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
                    $(SYSTEMUNIT)$(PPUEXT)
                    $(SYSTEMUNIT)$(PPUEXT)
 
 
-objc1$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc1.pp
+objc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc.pp $(INC)/objc1.inc $(INC)/objcnf.inc
 
 
-objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc1$(PPUEXT)
+objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc$(PPUEXT)
 
 
 #
 #
 # System Dependent Units
 # System Dependent Units

+ 19 - 0
rtl/inc/objc.pp

@@ -0,0 +1,19 @@
+
+unit objc;
+
+{$ifdef darwin}
+{$define targethandled}
+{$if defined(cpuarm) or defined(cpux86_64) or defined(cpupowerpc64)}
+{$i objcnf.inc}
+{$endif}
+
+{$if defined(cpui386) or defined(cpupowerpc32)}
+{$define targethandled}
+{$i objc1.inc}
+{$endif}
+{$endif}
+
+
+{$ifndef targethandled}
+  {$error Target not yet supported for objc.pp unit}
+{$endif}

+ 1 - 3
rtl/inc/objc1.pp → rtl/inc/objc1.inc

@@ -14,8 +14,6 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
-unit objc1;
-
 interface
 interface
 
 
 {$inline on}
 {$inline on}
@@ -32,7 +30,7 @@ uses
 {$ifdef darwin}
 {$ifdef darwin}
 const
 const
   libname = 'objc';
   libname = 'objc';
-  {$linkframework Cocoa}
+  {$linkframework Foundation}
   {$define targetok}
   {$define targetok}
 {$endif}
 {$endif}
 
 

+ 268 - 0
rtl/inc/objcnf.inc

@@ -0,0 +1,268 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2009 by the Free Pascal development team
+
+    This unit provides an interface to the Objective-C non-fragile
+    run time (1.5+/2.x) as defined by Apple
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+interface
+
+uses
+  ctypes
+{$ifdef unix}
+  ,unixtype
+{$endif}
+  ;
+
+{$packrecords c}
+
+{$ifdef darwin}
+const
+  libname = 'objc';
+  {$linkframework Foundation}
+  {$define targetok}
+{$endif}
+
+{$ifndef targetok}
+  {$error Add support for the current target to the objc1 unit }
+{$endif}
+
+const
+  CLS_CLASS        = 0;
+  CLS_META         = 1;
+  CLS_ROOT         = 2;
+  OBJC2_CLS_HIDDEN = $10;
+  CLS_EXCEPTION    = $20;
+
+type
+  { make all opaque types assignment-incompatible with other typed pointers by
+    declaring them as pointers to empty records
+
+    WARNING: do NOT change the names, types or field names/types of these
+      types, as many are used internally by the compiler.
+  }
+
+  { BOOL is one byte and uses 0/1, just like Pascal }
+  BOOL = boolean;
+
+  tobjc_class = record
+  end;
+  pobjc_class = ^tobjc_class;
+  _Class = pobjc_class;
+
+  id = ^objc_object;
+  pobjc_object = id;
+
+  _fpc_objc_sel_type = record
+  end;
+  SEL = ^_fpc_objc_sel_type;
+
+  IMP = function(target: id; msg: SEL): id; varargs; cdecl;
+  pIMP = ^IMP;
+
+(*
+  From Clang:
+  // struct _class_t {
+  //   struct _class_t *isa;
+  //   struct _class_t * const superclass;
+  //   void *cache;
+  //   IMP *vtable;
+  //   struct class_ro_t *ro;
+  // }
+  
+  // Full definition required by the compiler, do not make opaque!
+*)
+  objc_object = record
+    isa: pobjc_class;
+    superclass: pobjc_class;
+    cache: pointer;
+    vtable: pIMP;
+    ro: pointer;
+  end;
+
+  
+  // Full definition required by the compiler, do not make opaque!
+  objc_super = record
+    receiver: id;
+    _class: pobjc_class;
+  end;
+  pobjc_super = ^objc_super;
+
+(* From Clang:
+  // struct _protocol_t {
+  //   id isa;  // NULL
+  //   const char * const protocol_name;
+  //   const struct _protocol_list_t * protocol_list; // super protocols
+  //   const struct method_list_t * const instance_methods;
+  //   const struct method_list_t * const class_methods;
+  //   const struct method_list_t *optionalInstanceMethods;
+  //   const struct method_list_t *optionalClassMethods;
+  //   const struct _prop_list_t * properties;
+  //   const uint32_t size;  // sizeof(struct _protocol_t)
+  //   const uint32_t flags;  // = 0
+  // }
+  
+  // Full definition required by the compiler, do not make opaque!
+*)
+  objc_protocol = record
+    isa: id;
+    protocol_name: pchar;
+    protocol_list: pointer;
+    instance_methods,
+    class_methods,
+    optionalInstanceMethods,
+    optionalClassMethods: pointer;
+    properties: pointer;
+    size: cuint32;
+    flags: cuint32;
+  end;
+  pobjc_protocol = ^objc_protocol;
+  ppobjc_protocol = ^pobjc_protocol;
+
+(* From Clang:
+///  struct _ivar_t {
+///   unsigned long int *offset;  // pointer to ivar offset location
+///   char *name;
+///   char *type;
+///   uint32_t alignment;
+///   uint32_t size;
+  
+  // Full definition required by the compiler, do not make opaque!
+*)
+  objc_ivar = record
+    offset: pculong;
+    name: pchar;
+    ttype: pchar;
+    alignment: cuint32;
+    size: cuint32;
+  end;
+  Pobjc_ivar = ^objc_ivar;
+  Ivar = Pobjc_ivar;
+  PIvar = ^Ivar;
+
+  // Full definition required by the compiler, do not make opaque!
+  objc_method = record
+    _cmd: SEL;
+    method_type: pchar;
+    _imp: pchar;
+  end;
+  Pobjc_method = ^objc_method;
+  Method = Pobjc_method;
+  PMethod = ^Method;
+
+  { type that certainly will be returned by address }
+  tdummyrecbyaddrresult = record
+    a: array[0..1000] of shortstring;
+  end;
+
+  ptrdiff_t = ptrint;
+
+{ sending messages }
+  function  objc_msgSend(self: id; op: SEL): id; cdecl; varargs; external libname;
+  function  objc_msgSendSuper(const super: pobjc_super; op: SEL): id; cdecl; varargs; external libname;
+  function  objc_msgSendSuper2(const super: pobjc_super; op: SEL): id; cdecl; varargs; weakexternal libname; { Mac OS X 10.6 and later }
+  { The following two are declared as procedures with the hidden result pointer
+    as their first parameter. This corresponds to the declaration below as far
+    as the code generator is concerned (and is easier to handle in the compiler).  }
+  function  objc_msgSend_stret(self: id; op: SEL): tdummyrecbyaddrresult; cdecl; varargs; external libname;
+  function  objc_msgSendSuper_stret(const super: pobjc_super; op: SEL): tdummyrecbyaddrresult; cdecl; varargs; external libname;
+  function  objc_msgSendSuper2_stret(const super: pobjc_super; op: SEL): tdummyrecbyaddrresult; cdecl; varargs; weakexternal libname;
+  { This one actually also exists to return extended on x86_64, but
+    we don't support that yet
+  }
+{$ifdef cpui386}
+  function  objc_msgSend_fpret (self: id; op: SEL): double; cdecl; varargs; external libname;
+{$else cpui386}
+  function  objc_msgSend_fpret (self: id; op: SEL): double; cdecl; varargs; external libname name 'objc_msgSend';
+{$endif cpui386}
+
+  function sel_getName(sel: SEL): PChar; cdecl; external libname;
+  function sel_registerName(str: PChar): SEL; cdecl; external libname;
+  function object_getClassName(obj: id): PChar; cdecl; external libname;
+  function object_getIndexedIvars(obj: id ): Pointer; cdecl; external libname;
+
+  function sel_getUid(const str: PChar): SEL; cdecl; external libname;
+
+  function object_copy(obj:id; size:size_t):id; cdecl; external libname;
+  function object_dispose(obj:id):id; cdecl; external libname;
+
+  function object_getClass(obj:id): pobjc_class; cdecl; external libname;
+  function object_setClass(obj:id; cls: pobjc_class):pobjc_class; cdecl; external libname;
+
+  function object_getIvar(obj:id; _ivar:Ivar):id; cdecl; external libname;
+  procedure object_setIvar(obj:id; _ivar:Ivar; value:id); cdecl; external libname;
+
+  function object_setInstanceVariable(obj:id; name:pchar; value:pointer):Ivar; cdecl; external libname;
+  function object_getInstanceVariable(obj:id; name:pchar; var outValue: Pointer):Ivar; cdecl; external libname;
+
+  function objc_getClass(name:pchar):id; cdecl; external libname;
+  function objc_getMetaClass(name:pchar):id; cdecl; external libname;
+  function objc_lookUpClass(name:pchar):id; cdecl; external libname;
+  function objc_getClassList(buffer:pClass; bufferCount:cint):cint; cdecl; external libname;
+
+  function objc_getProtocol(name:pchar): pobjc_protocol; cdecl; external libname;
+  function objc_copyProtocolList(outCount:pdword):ppobjc_protocol; cdecl; external libname;
+
+  function class_getName(cls:pobjc_class):PChar; cdecl; external libname;
+  function class_isMetaClass(cls:pobjc_class):BOOL; cdecl; external libname;
+  function class_getSuperclass(cls:pobjc_class):pobjc_class; cdecl; external libname;
+
+  function class_getVersion(cls:pobjc_class):longint; cdecl; external libname;
+  procedure class_setVersion(cls:pobjc_class; version:longint); cdecl; external libname;
+
+  function class_getInstanceSize(cls:pobjc_class):size_t; cdecl; external libname;
+
+  function class_getInstanceVariable(cls:pobjc_class; name:pchar):Ivar; cdecl; external libname;
+  function class_getClassVariable(cls:pobjc_class; name:pchar):Ivar; cdecl; external libname;
+  function class_copyIvarList(cls:pobjc_class; outCount:pdword):PIvar; cdecl; external libname;
+
+  function class_getInstanceMethod(cls:pobjc_class; name:SEL):Method; cdecl; external libname;
+  function class_getClassMethod(cls:pobjc_class; name:SEL):Method; cdecl; external libname;
+  function class_getMethodImplementation(cls:pobjc_class; name:SEL):IMP; cdecl; external libname;
+  function class_getMethodImplementation_stret(cls:pobjc_class; name:SEL):IMP; cdecl; external libname;
+  function class_respondsToSelector(cls:pobjc_class; sel:SEL):BOOL; cdecl; external libname;
+  function class_copyMethodList(cls:pobjc_class; outCount:pdword):PMethod; cdecl; external libname;
+
+  function class_conformsToProtocol(cls:pobjc_class; var protocol: pobjc_protocol):BOOL; cdecl; external libname;
+  function class_copyProtocolList(cls:pobjc_class; var outCount: dword):ppobjc_protocol; cdecl; external libname;
+
+  function class_createInstance(cls:pobjc_class; extraBytes:size_t):id; cdecl; external libname;
+
+  function objc_allocateClassPair(superclass:pobjc_class; name:pchar; extraBytes:size_t):pobjc_class; cdecl; external libname;
+  procedure objc_registerClassPair(cls:pobjc_class); cdecl; external libname;
+  function objc_duplicateClass(original:pobjc_class; name:pchar; extraBytes:size_t):pobjc_class; cdecl; external libname;
+  procedure objc_disposeClassPair(cls:pobjc_class); cdecl; external libname;
+
+  function class_addMethod(cls:pobjc_class; name:SEL; _imp:IMP; types:pchar):BOOL; cdecl; external libname;
+  function class_addIvar(cls:pobjc_class; name:pchar; size:size_t; alignment:cuint8; types:pchar):BOOL; cdecl; external libname;
+  function class_addProtocol(cls:pobjc_class; protocol:pobjc_protocol):BOOL; cdecl; external libname;
+
+  function method_getName(m:Method):SEL; cdecl; external libname;
+  function method_getImplementation(m:Method):IMP; cdecl; external libname;
+  function method_getTypeEncoding(m:Method):Pchar; cdecl; external libname;
+
+  function method_getNumberOfArguments(m:Method):dword; cdecl; external libname;
+  function method_copyReturnType(m:Method):Pchar; cdecl; external libname;
+  function method_copyArgumentType(m:Method; index:dword):Pchar; cdecl; external libname;
+  procedure method_getReturnType(m:Method; dst:pchar; dst_len:size_t); cdecl; external libname;
+
+  function method_setImplementation(m:Method; imp:IMP):IMP; cdecl; external libname;
+
+  function ivar_getName(v:Ivar):Pchar; cdecl; external libname;
+  function ivar_getTypeEncoding(v:Ivar):Pchar; cdecl; external libname;
+  function ivar_getOffset(v:Ivar):ptrdiff_t; cdecl; external libname;
+
+  function sel_isEqual(lhs:SEL; rhs:SEL):BOOL; cdecl; external libname;
+
+implementation
+
+end.

+ 1 - 1
tests/test/tobjc1.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc10.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc11.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc12.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc13.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc13a.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc13b.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 0
tests/test/tobjc14.pp

@@ -1,4 +1,5 @@
 { %OPT=-Sew -vw }
 { %OPT=-Sew -vw }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc15.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc16.pp

@@ -1,7 +1,7 @@
 { %fail }
 { %fail }
 { %opt=-vh -Seh }
 { %opt=-vh -Seh }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc17.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 program project1;
 program project1;
 
 

+ 1 - 1
tests/test/tobjc18.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}

+ 1 - 1
tests/test/tobjc19.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc2.pp

@@ -1,5 +1,5 @@
 { %target=darwin}
 { %target=darwin}
-{ %cpu=powerpc,i386}
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc20.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 program project1;
 program project1;
 
 

+ 4 - 2
tests/test/tobjc21.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 program project1;
 program project1;
 
 
@@ -21,8 +21,10 @@ function MyObject.getsspara(l1,l2: longint): shortstring;
 begin
 begin
   if (self<>m) then
   if (self<>m) then
     halt(1);
     halt(1);
-  if _cmd<>objcselector('getss:l1:') then
+  if (self.self<>m) then
     halt(2);
     halt(2);
+  if _cmd<>objcselector('getss:l1:') then
+    halt(3);
   result:='';
   result:='';
 end;
 end;
 
 

+ 1 - 1
tests/test/tobjc22.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 program protocoltest;
 program protocoltest;
 
 

+ 1 - 1
tests/test/tobjc3.pp

@@ -1,7 +1,7 @@
 { %fail }
 { %fail }
 { %opt=-vh -Seh }
 { %opt=-vh -Seh }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc4.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc4a.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc5.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc5a.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %fail }
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 
 
 {$modeswitch objectivec1}
 {$modeswitch objectivec1}
 
 

+ 1 - 1
tests/test/tobjc6.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc7.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 { %recompile }
 { %recompile }
 
 

+ 1 - 1
tests/test/tobjc7a.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %fail }
 { %fail }
 
 
 
 

+ 1 - 1
tests/test/tobjc7b.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %fail }
 { %fail }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc7c.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc8.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %opt=-vh -Seh }
 { %opt=-vh -Seh }
 { %fail }
 { %fail }
 
 

+ 1 - 1
tests/test/tobjc8a.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %opt=-vh -Seh }
 { %opt=-vh -Seh }
 { %norun }
 { %norun }
 
 

+ 1 - 1
tests/test/tobjc9.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc9a.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %fail }
 { %fail }
 
 
 {$mode objfpc}
 {$mode objfpc}

+ 1 - 1
tests/test/tobjc9b.pp

@@ -1,5 +1,5 @@
 { %target=darwin }
 { %target=darwin }
-{ %cpu=powerpc,i386 }
+{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
 { %norun }
 { %norun }
 
 
 {$mode objfpc}
 {$mode objfpc}

部分文件因文件數量過多而無法顯示