mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 12:25:59 +02:00
* Force linker target
git-svn-id: trunk@376 -
This commit is contained in:
parent
cb9e465f9f
commit
31d3e72e56
@ -201,6 +201,14 @@ procedure TLinkerLinux.SetDefaultInfo;
|
|||||||
{
|
{
|
||||||
This will also detect which libc version will be used
|
This will also detect which libc version will be used
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const
|
||||||
|
{$ifdef i386} platform_select='-b elf32-i386 -m elf_i386';{$endif}
|
||||||
|
{$ifdef x86_64} platform_select='-b elf64-x86-64 -m elf_x86_64';{$endif}
|
||||||
|
{$ifdef powerpc}platform_select='-b elf32-powerpc -m elf32ppclinux';{$endif}
|
||||||
|
{$ifdef sparc} platform_select='-b elf32-sparc -m elf32_sparc';{$endif}
|
||||||
|
{$ifdef arm} platform_select='';{$endif} {unknown :( }
|
||||||
|
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
var
|
var
|
||||||
St : SearchRec;
|
St : SearchRec;
|
||||||
@ -208,8 +216,8 @@ var
|
|||||||
begin
|
begin
|
||||||
with Info do
|
with Info do
|
||||||
begin
|
begin
|
||||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES';
|
ExeCmd[1]:='ld '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES';
|
||||||
DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
|
DllCmd[1]:='ld '+platform_select+' $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
|
||||||
DllCmd[2]:='strip --strip-unneeded $EXE';
|
DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
libctype:=glibc2;
|
libctype:=glibc2;
|
||||||
|
@ -864,15 +864,15 @@ Procedure TLinkerWin32.SetDefaultInfo;
|
|||||||
begin
|
begin
|
||||||
with Info do
|
with Info do
|
||||||
begin
|
begin
|
||||||
ExeCmd[1]:='ld $OPT $STRIP $APPTYPE $IMAGEBASE $RELOC -o $EXE $RES';
|
ExeCmd[1]:='ld -b pe-i386 -m i386pe $OPT $STRIP $APPTYPE $IMAGEBASE $RELOC -o $EXE $RES';
|
||||||
DllCmd[1]:='ld $OPT $STRIP --dll $APPTYPE $IMAGEBASE $RELOC -o $EXE $RES';
|
DllCmd[1]:='ld -b pe-i386 -m i386pe $OPT $STRIP --dll $APPTYPE $IMAGEBASE $RELOC -o $EXE $RES';
|
||||||
{ ExeCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF';
|
{ ExeCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF';
|
||||||
use short forms to avoid 128 char limitation problem }
|
use short forms to avoid 128 char limitation problem }
|
||||||
ExeCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
ExeCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
||||||
ExeCmd[3]:='ld $OPT $STRIP $APPTYPE $IMAGEBASE -o $EXE $RES exp.$$$';
|
ExeCmd[3]:='ld -b pe-i386 -m i386pe $OPT $STRIP $APPTYPE $IMAGEBASE -o $EXE $RES exp.$$$';
|
||||||
{ DllCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF'; }
|
{ DllCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF'; }
|
||||||
DllCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
DllCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
||||||
DllCmd[3]:='ld $OPT $STRIP --dll $APPTYPE $IMAGEBASE -o $EXE $RES exp.$$$';
|
DllCmd[3]:='ld -b pe-i386 -m i386pe $OPT $STRIP --dll $APPTYPE $IMAGEBASE -o $EXE $RES exp.$$$';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user