Add -EB or -EL paramter to xtensa assembler call (Warning: this requires a patched 2.40 release\!)

This commit is contained in:
Pierre Muller 2023-04-13 13:03:48 +00:00
parent 4750840e89
commit 665670ae01

View File

@ -66,6 +66,11 @@ unit agcpugas;
function TXtensaGNUAssembler.MakeCmdLine: TCmdStr;
begin
result:=inherited MakeCmdLine;
if target_info.endian=endian_little then
Replace(result,'$SHORTENDIAN','-EL')
else
Replace(result,'$SHORTENDIAN','-EB');
end;
{****************************************************************************}
@ -178,7 +183,7 @@ unit agcpugas;
idtxt : 'AS';
asmbin : 'as';
asmcmd : '-o $OBJ $EXTRAOPT $ASM --longcalls';
asmcmd : '-o $OBJ $SHORTENDIAN $EXTRAOPT $ASM --longcalls';
supported_targets : [system_xtensa_embedded,system_xtensa_linux,system_xtensa_freertos];
flags : [af_needar,af_smartlink_sections,af_supports_dwarf,af_stabs_use_function_absolute_addresses];
labelprefix : '.L';