mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 15:10:41 +02:00
Specify endianess and abi when calling xtensa linker
This commit is contained in:
parent
60cff917ba
commit
4750840e89
@ -98,10 +98,24 @@ const
|
||||
{$else}
|
||||
platform_select='';
|
||||
{$endif}
|
||||
var
|
||||
platformopt : string;
|
||||
begin
|
||||
{$ifdef xtensa}
|
||||
if target_info.endian=endian_little then
|
||||
platformopt:=' -b elf32-xtensa-le -m elf32xtensa'
|
||||
else
|
||||
platformopt:=' -b elf32-xtensa-be -m elf32xtensa';
|
||||
if target_info.abi=abi_xtensa_call0 then
|
||||
platformopt:=platformopt+' --abi-call0'
|
||||
else if target_info.abi=abi_xtensa_windowed then
|
||||
platformopt:=platformopt+' --abi-windowed';
|
||||
{$else}
|
||||
platformopt:='';
|
||||
{$endif}
|
||||
with Info do
|
||||
begin
|
||||
ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
|
||||
ExeCmd[1]:='ld -g '+platform_select+platformopt+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -73,8 +73,22 @@ const
|
||||
{$else}
|
||||
platform_select='';
|
||||
{$endif}
|
||||
var
|
||||
platformopt : string;
|
||||
begin
|
||||
Info.ExeCmd[1]:='ld -g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
|
||||
{$ifdef xtensa}
|
||||
if target_info.endian=endian_little then
|
||||
platformopt:=' -b elf32-xtensa-le -m elf32xtensa'
|
||||
else
|
||||
platformopt:=' -b elf32-xtensa-be -m elf32xtensa';
|
||||
if target_info.abi=abi_xtensa_call0 then
|
||||
platformopt:=platformopt+' --abi-call0'
|
||||
else if target_info.abi=abi_xtensa_windowed then
|
||||
platformopt:=platformopt+' --abi-windowed';
|
||||
{$else}
|
||||
platformopt:='';
|
||||
{$endif}
|
||||
Info.ExeCmd[1]:='ld -g '+platform_select+platformopt+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
|
||||
end;
|
||||
|
||||
|
||||
|
@ -402,6 +402,16 @@ begin
|
||||
else
|
||||
platformopt:=' -b elf64-powerpc -m elf64ppc';
|
||||
{$endif powerpc64}
|
||||
{$ifdef xtensa}
|
||||
if target_info.endian=endian_little then
|
||||
platformopt:=' -b elf32-xtensa-le -m elf32xtensa'
|
||||
else
|
||||
platformopt:=' -b elf32-xtensa-be -m elf32xtensa';
|
||||
if target_info.abi=abi_xtensa_call0 then
|
||||
platformopt:=platformopt+' --abi-call0'
|
||||
else if target_info.abi=abi_xtensa_windowed then
|
||||
platformopt:=platformopt+' --abi-windowed';
|
||||
{$endif}
|
||||
{$ifdef arm}
|
||||
platformopt:=' -z noexecstack';
|
||||
{$endif arm}
|
||||
|
Loading…
Reference in New Issue
Block a user