Pārlūkot izejas kodu

+ Add system_x86_64_openbsd_info record

git-svn-id: trunk@20715 -
pierre 13 gadi atpakaļ
vecāks
revīzija
7e71e1d3a0
2 mainītis faili ar 71 papildinājumiem un 0 dzēšanām
  1. 67 0
      compiler/systems/i_bsd.pas
  2. 4 0
      compiler/systems/t_bsd.pas

+ 67 - 0
compiler/systems/i_bsd.pas

@@ -308,6 +308,70 @@ unit i_bsd;
             abi          : abi_default;
           );
 
+       system_x86_64_openbsd_info : tsysteminfo =
+          (
+            system       : system_x86_64_openbsd;
+            name         : 'OpenBSD for x86-64';
+            shortname    : 'OpenBSD';
+            flags        : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
+                            tf_files_case_sensitive,tf_smartlink_library,
+                            tf_dwarf_only_local_labels
+                            { tf_pic_uses_got,tf_smartlink_sections},tf_has_winlike_resources];
+            cpu          : cpu_x86_64;
+            unit_env     : 'BSDUNITS';
+            extradefines : 'UNIX;HASUNIX;BSD';
+            exeext       : '';
+            defext       : '.def';
+            scriptext    : '.sh';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            sharedlibext : '.so';
+            staticlibext : '.a';
+            staticlibprefix : 'libp';
+            sharedlibprefix : 'lib';
+            sharedClibext : '.so';
+            staticClibext : '.a';
+            staticClibprefix : 'lib';
+            sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
+            Cprefix      : '';
+            newline      : #10;
+            dirsep       : '/';
+            assem        : as_x86_64_elf64;
+            assemextern  : as_gas;
+            link         : nil;
+            linkextern   : nil;
+            ar           : ar_gnu_ar;
+            res          : res_elf;
+            dbg          : dbg_dwarf2;            //dbg_stabs;
+            script       : script_unix;
+            endian       : endian_little;
+            alignment    :
+              (
+                procalign       : 8;
+                loopalign       : 4;
+                jumpalign       : 0;
+                constalignmin   : 0;
+                constalignmax   : 8;
+                varalignmin     : 0;
+                varalignmax     : 16;
+                localalignmin   : 4;
+                localalignmax   : 16;
+                recordalignmin  : 0;
+                recordalignmax  : 16;
+                maxCrecordalign : 16
+              );
+            first_parm_offset : 16;
+            stacksize    : 256*1024;
+            abi          : abi_default;
+          );
+
        system_m68k_netbsd_info : tsysteminfo =
           (
             system       : system_m68k_NetBSD;
@@ -828,6 +892,9 @@ initialization
    {$ifdef FreeBSD}
      set_source_info(system_x86_64_FreeBSD_info);
    {$endif}
+   {$ifdef OpenBSD}
+     set_source_info(system_x86_64_OpenBSD_info);
+   {$endif}
    {$ifdef Darwin}
      set_source_info(system_x86_64_darwin_info);
    {$endif}

+ 4 - 0
compiler/systems/t_bsd.pas

@@ -847,6 +847,10 @@ initialization
   RegisterImport(system_x86_64_freebsd,timportlibbsd);
   RegisterExport(system_x86_64_freebsd,texportlibbsd);
   RegisterTarget(system_x86_64_freebsd_info);
+  RegisterExternalLinker(system_x86_64_OpenBSD_info,TLinkerBSD);
+  RegisterImport(system_x86_64_openbsd,timportlibbsd);
+  RegisterExport(system_x86_64_openbsd,texportlibbsd);
+  RegisterTarget(system_x86_64_openbsd_info);
 
   RegisterExternalLinker(system_x86_64_darwin_info,TLinkerBSD);
   RegisterImport(system_x86_64_darwin,timportlibdarwin);