Browse Source

Add $EMUL also for sparc CPU GNU linker call on solaris OS

Pierre Muller 1 year ago
parent
commit
c68ddc5360
1 changed files with 12 additions and 4 deletions
  1. 12 4
      compiler/systems/t_sunos.pas

+ 12 - 4
compiler/systems/t_sunos.pas

@@ -95,8 +95,11 @@ const
 {$endif }
 {$endif }
 {$ifdef sparc}
 {$ifdef sparc}
 const
 const
-  { no emulation specification needed, as long as only 32-bit is supported }
-  gnu_emul = '';
+  gnu_emul = '-m elf32_sparc_sol2';
+{$endif}
+{$ifdef sparc64}
+const
+  gnu_emul = '-m elf64_sparc_sol2';
 {$endif}
 {$endif}
 
 
 Constructor TLinkersolaris.Create;
 Constructor TLinkersolaris.Create;
@@ -136,8 +139,13 @@ const
 {$endif }
 {$endif }
 {$ifdef sparc}
 {$ifdef sparc}
 const
 const
-  gld = 'gld ';
-  solaris_ld = 'ld ';
+  gld = 'gld $EMUL';
+  solaris_ld = 'ld -m32';
+{$endif}
+{$ifdef sparc64}
+const
+  gld = 'gld $EMUL';
+  solaris_ld = 'ld -m64';
 {$endif}
 {$endif}
 begin
 begin
   Glibc2:=false;
   Glibc2:=false;