mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 10:19:31 +01:00 
			
		
		
		
	Use -march and -mabi options for GNU assembler call.
This avoids problems on newer GNU assembler, which might have a default ABI different from O32. git-svn-id: trunk@22664 -
This commit is contained in:
		
							parent
							
								
									305206354a
								
							
						
					
					
						commit
						25b0de0c28
					
				@ -26,13 +26,15 @@ unit cpugas;
 | 
			
		||||
  interface
 | 
			
		||||
 | 
			
		||||
    uses
 | 
			
		||||
      cpubase,
 | 
			
		||||
      cpubase, aasmbase, globtype,
 | 
			
		||||
      aasmtai, aasmcpu, assemble, aggas;
 | 
			
		||||
 | 
			
		||||
    type
 | 
			
		||||
      TMIPSGNUAssembler = class(TGNUassembler)
 | 
			
		||||
        nomacro, noreorder, noat : boolean;
 | 
			
		||||
        constructor create(smart: boolean); override;
 | 
			
		||||
        {# Constructs the command line for calling the assembler }
 | 
			
		||||
        function MakeCmdLine: TCmdStr; override;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
      TMIPSInstrWriter = class(TCPUInstrWriter)
 | 
			
		||||
@ -50,7 +52,7 @@ unit cpugas;
 | 
			
		||||
  implementation
 | 
			
		||||
 | 
			
		||||
    uses
 | 
			
		||||
      aasmbase, cutils, systems,
 | 
			
		||||
      cutils, systems, cpuinfo,
 | 
			
		||||
      verbose, itcpugas, cgbase, cgutils;
 | 
			
		||||
 | 
			
		||||
    function gas_std_regname(r:Tregister):string;
 | 
			
		||||
@ -92,6 +94,14 @@ unit cpugas;
 | 
			
		||||
        noat:=false;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
    function TMIPSGNUAssembler.MakeCmdLine: TCmdStr;
 | 
			
		||||
      begin
 | 
			
		||||
         result := Inherited MakeCmdLine;
 | 
			
		||||
         { ABI selection }
 | 
			
		||||
         Replace(result,'$ABI','-mabi='+abitypestr[mips_abi]);
 | 
			
		||||
         { ACH selection }
 | 
			
		||||
         Replace(result,'$ARCH','-march='+cputypestr[mips_cpu]);
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
{****************************************************************************}
 | 
			
		||||
{                  Helper routines for Instruction Writer                    }
 | 
			
		||||
@ -376,7 +386,7 @@ unit cpugas;
 | 
			
		||||
        id: as_gas;
 | 
			
		||||
        idtxt: 'AS';
 | 
			
		||||
        asmbin: 'as';
 | 
			
		||||
        asmcmd: '-mips2 $NOWARN -EL $PIC -o $OBJ $ASM';
 | 
			
		||||
        asmcmd: '$ABI $ARCH $NOWARN -EL $PIC -o $OBJ $ASM';
 | 
			
		||||
        supported_targets: [system_mipsel_linux];
 | 
			
		||||
        flags: [af_allowdirect, af_needar, af_smartlink_sections];
 | 
			
		||||
        labelprefix: '.L';
 | 
			
		||||
@ -388,7 +398,7 @@ unit cpugas;
 | 
			
		||||
        id: as_gas;
 | 
			
		||||
        idtxt: 'AS';
 | 
			
		||||
        asmbin: 'as';
 | 
			
		||||
        asmcmd: '-mips2 $NOWARN -EB $PIC -o $OBJ $ASM';
 | 
			
		||||
        asmcmd: '$ABI $ARCH $NOWARN -EB $PIC -o $OBJ $ASM';
 | 
			
		||||
        supported_targets: [system_mipseb_linux];
 | 
			
		||||
        flags: [af_allowdirect, af_needar, af_smartlink_sections];
 | 
			
		||||
        labelprefix: '.L';
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user