Преглед изворни кода

* Merge adding of --32 or --64 to command line assembler

git-svn-id: branches/fixes_2_0@2326 -
daniel пре 19 година
родитељ
комит
b990e72c60
2 измењених фајлова са 10 додато и 3 уклоњено
  1. 8 1
      compiler/assemble.pas
  2. 2 2
      compiler/x86/agx86att.pas

+ 8 - 1
compiler/assemble.pas

@@ -570,6 +570,13 @@ Implementation
           end;
       end;
 
+{$ifdef i386}
+    const format_option='--32';
+{$else}{$ifdef x86_64}
+    const format_option='--64';
+{$else}
+    const format_option='';
+{$endif}{$endif}
 
     procedure TExternalAssembler.AsmCreate(Aplace:tcutplace);
       begin
@@ -579,7 +586,7 @@ Implementation
         if DoPipe then
          begin
            Message1(exec_i_assembling_pipe,asmfile);
-           POpen(outfile,'as -o '+objfile,'W');
+           POpen(outfile,'as '+format_option+' -o '+objfile,'W');
          end
         else
 {$endif}

+ 2 - 2
compiler/x86/agx86att.pas

@@ -240,7 +240,7 @@ interface
             id     : as_gas;
             idtxt  : 'AS';
             asmbin : 'as';
-            asmcmd : '-o $OBJ $ASM';
+            asmcmd : '--64 -o $OBJ $ASM';
             supported_target : system_any;
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
@@ -252,7 +252,7 @@ interface
             id     : as_gas;
             idtxt  : 'AS';
             asmbin : 'as';
-            asmcmd : '-o $OBJ $ASM';
+            asmcmd : '--32 -o $OBJ $ASM';
             supported_target : system_any;
             flags : [af_allowdirect,af_needar,af_smartlink_sections];
             labelprefix : '.L';