瀏覽代碼

* set elf flags for soft float on arm

git-svn-id: trunk@10560 -
peter 17 年之前
父節點
當前提交
a9c9ca0115
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. 8 2
      compiler/assemble.pas
  2. 2 0
      compiler/ogelf.pas

+ 8 - 2
compiler/assemble.pas

@@ -176,9 +176,9 @@ Implementation
       cclasses,
       cclasses,
 {$endif memdebug}
 {$endif memdebug}
       script,fmodule,verbose,
       script,fmodule,verbose,
-{$ifdef m68k}
+{$if defined(m68k) or defined(arm)}
       cpuinfo,
       cpuinfo,
-{$endif m68k}
+{$endif m68k or arm}
       aasmcpu,
       aasmcpu,
       owbase,owar
       owbase,owar
       ;
       ;
@@ -509,6 +509,12 @@ Implementation
         else
         else
           result:='-m68000 '+result;
           result:='-m68000 '+result;
 {$endif}
 {$endif}
+
+{$ifdef arm}
+        if current_settings.fputype = fpu_soft then
+         result:='-mfpu=softvfp '+result;
+{$endif arm}
+
         if (cs_link_on_target in current_settings.globalswitches) then
         if (cs_link_on_target in current_settings.globalswitches) then
          begin
          begin
            Replace(result,'$ASM',maybequoted(ScriptFixFileName(AsmFileName)));
            Replace(result,'$ASM',maybequoted(ScriptFixFileName(AsmFileName)));

+ 2 - 0
compiler/ogelf.pas

@@ -1075,6 +1075,8 @@ implementation
 {$endif powerpc}
 {$endif powerpc}
 {$ifdef arm}
 {$ifdef arm}
            header.e_machine:=40;
            header.e_machine:=40;
+           if (current_settings.fputype=cpu_soft) then
+             header.e_flags:=$600;
 {$endif arm}
 {$endif arm}
 {$ifdef x86_64}
 {$ifdef x86_64}
            header.e_machine:=62;
            header.e_machine:=62;