Browse Source

m68k: there are now cross-binutils for old MacOS, so based on the old/existing bits, fix the support in the compiler

git-svn-id: trunk@37028 -
Károly Balogh 8 years ago
parent
commit
1d78e73ed8
3 changed files with 74 additions and 2 deletions
  1. 3 0
      compiler/m68k/cputarg.pas
  2. 69 0
      compiler/systems/i_macos.pas
  3. 2 2
      compiler/systems/t_macos.pas

+ 3 - 0
compiler/m68k/cputarg.pas

@@ -50,6 +50,9 @@ implementation
     {$ifndef NOTARGETBSD}
     {$ifndef NOTARGETBSD}
       ,t_bsd
       ,t_bsd
     {$endif}
     {$endif}
+    {$ifndef NOTARGETMACOS}
+      ,t_macos
+    {$endif}
     {$ifndef NOTARGETEMBEDDED}
     {$ifndef NOTARGETEMBEDDED}
       ,t_embed
       ,t_embed
     {$endif}
     {$endif}

+ 69 - 0
compiler/systems/i_macos.pas

@@ -91,6 +91,70 @@ unit i_macos;
             llvmdatalayout : 'todo';
             llvmdatalayout : 'todo';
           );
           );
 
 
+     const
+       system_m68k_mac_info : tsysteminfo =
+          (
+            system       : system_m68k_mac;
+            name         : 'Mac OS for m68k';
+            shortname    : 'MacOS';
+            flags        : [tf_p_ext_support,tf_files_case_aware];
+            cpu          : cpu_m68k;
+            unit_env     : '';
+            extradefines : '';
+            exeext       : '';
+            defext       : '';
+            scriptext    : '';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            sharedlibext : 'Lib';
+            staticlibext : 'Lib';
+            staticlibprefix : '';
+            sharedlibprefix : '';
+            sharedClibext : 'Lib';
+            staticClibext : 'Lib';
+            staticClibprefix : '';
+            sharedClibprefix : '';
+            importlibprefix : 'imp';
+            importlibext : 'Lib';
+            Cprefix      : '';
+            newline      : #13;
+            dirsep       : ':';
+            assem        : as_gas;
+            assemextern  : as_gas;
+            link         : ld_none;
+            linkextern   : ld_none;
+            ar           : ar_gnu_ar;
+            res          : res_none;
+            dbg          : dbg_stabs;
+            script       : script_mpw;
+            endian       : endian_big;
+            alignment    :
+              (
+                procalign       : 4;
+                loopalign       : 4;
+                jumpalign       : 0;
+                constalignmin   : 0;
+                constalignmax   : 4;
+                varalignmin     : 0;
+                varalignmax     : 4;
+                localalignmin   : 0;
+                localalignmax   : 4;
+                recordalignmin  : 0;
+                recordalignmax  : 2;
+                maxCrecordalign : 2
+              );
+            first_parm_offset : 8;
+            stacksize    : 32768;
+            stackalign   : 2;
+            abi : abi_default;
+            llvmdatalayout : 'todo';
+          );
+
   implementation
   implementation
 
 
 initialization
 initialization
@@ -99,4 +163,9 @@ initialization
     set_source_info(system_powerpc_macos_info);
     set_source_info(system_powerpc_macos_info);
   {$endif macos}
   {$endif macos}
 {$endif cpupowerpc}
 {$endif cpupowerpc}
+{$ifdef cpum68k}
+  {$ifdef macos}
+    set_source_info(system_m68k_mac_info);
+  {$endif macos}
+{$endif cpum68k}
 end.
 end.

+ 2 - 2
compiler/systems/t_macos.pas

@@ -244,8 +244,8 @@ end;
 
 
 initialization
 initialization
 {$ifdef m68k}
 {$ifdef m68k}
-  RegisterTarget(system_m68k_macos_info);
-  RegisterImport(system_m68k_macos,timportlibmacos);
+  RegisterTarget(system_m68k_mac_info);
+  RegisterImport(system_m68k_mac,timportlibmacos);
 {$endif m68k}
 {$endif m68k}
 {$ifdef powerpc}
 {$ifdef powerpc}
   RegisterLinker(ld_mpw,TLinkerMPW);
   RegisterLinker(ld_mpw,TLinkerMPW);