Mark Morgan Lloyd wrote:
Sven Barth wrote:
Am 05.10.2012 11:34, schrieb Mark Morgan Lloyd:
For information, it works, but I'm getting an error when it calls the
linker. If I link using a script it's fine:
It would help very much if you'd post the error that you get.
I posted the minimum to report (partial) success in case the problem was
considered below the threshold of interest.
I'm compiling binutils 2.20 using
./configure --prefix=/usr/local/i486-linux i486-linux-gnu
etc., and then setting up symlinks
/usr/local/bin/i486-linux-as -> /usr/local/i486-linux/bin/as
etc. When I do a direct compilation I get
~$ fpc -XPi486-linux- test.pas
Free Pascal Compiler version 2.6.0 [2012/05/05] for i386
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling test.pas
Linking test
test.pas(5,1) Error: Can't call the linker, switching to external linking
test.pas(5,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you
did not specify a source file to be compiled)
If I use -vt I see
..
Searching file /usr/local/lib/fpc/2.6.0/I486-LINUX-LD... not found
Searching file /usr/local/bin/i486-linux-ld... found
Using util /usr/local/bin/i486-linux-ld
test.pas(5,1) Error: Can't call the linker, switching to external linking
test.pas(5,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you
did not specify a source file to be compiled)
Nothing obviously useful in -vv output.
Also ppas.sh reads
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Linking test
OFS=$IFS
IFS="
"
/usr/local/bin/i486-linux-ld -b elf32-i386 -m elf_i386 -s -L. -o
test link.res
if [ $? != 0 ]; then DoExitLink test; fi
IFS=$OFS
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal