I'm currently running through the sequence of building all significant versions of FPC on i386, using a fairly old laptop. This has Debian 5 "Lenny" on it, in part because it's what supports video etc. well but also because it's a useful "sweet spot" release compatible with SPARC etc.
v3.0.4 builds without issue. V3.2.0 gives me this reproducible problem:
/usr/local/src_fpc/fpcbuild-3.2.0/fpcsrc/compiler$ /usr/local/src_fpc/fpcbuild-3.2.0/fpcsrc/compiler/ppc1 -Ur -Xs -O2 -n -Fui386 -Fusystems -Fu/usr/local/src_fpc/fpcbuild-3.2.0/fpcsrc/rtl/units/i386-linux -Fii386 -FE. -FUi386/units/i386-linux -dRELEASE -di386 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas
/usr/bin/ld:./link.res:315: syntax error
pp.pas(266,1) Error: Error while linking
pp.pas(266,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
$ /usr/bin/ld --version
GNU ld (GNU Binutils for Debian) 2.18.0.20080103
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
If I add the -sh parameter, then add --verbose to the invocation of ld in ppas.sh, I get
$ cat ppas.sh
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Linking ./pp
OFS=$IFS
IFS="
"
/usr/bin/ld --verbose -b elf32-i386 -m elf_i386 -s -L. -o ./pp -T ./link.res -e _start
if [ $? != 0 ]; then DoExitLink ./pp; fi
IFS=$OFS
/usr/local/src_fpc/fpcbuild-3.2.0/fpcsrc/compiler$ ./ppas.sh
Linking ./pp
GNU ld (GNU Binutils for Debian) 2.18.0.20080103
Supported emulations:
elf_i386
i386linux
elf_x86_64
opened script file ./link.res
/usr/bin/ld:./link.res:315: syntax error
An error occurred while linking ./pp
where line 315 is the final line in link.res, which reads
...
i386/units/i386-linux/rasm.o
i386/units/i386-linux/rax86.o
i386/units/i386-linux/rautils.o
i386/units/i386-linux/rax86att.o
i386/units/i386-linux/raatt.o
)
SECTIONS
{
.fpcdata :
{
KEEP (*(.fpc .fpc.n_version .fpc.n_links))
}
.threadvar : { *(.threadvar .threadvar.* .gnu.linkonce.tv.*) }
}
INSERT AFTER .data;
I mention this in case it is of interest to the core developers, not because I'm expecting a fix (although one would be nice, and would allow me to continue testing recent FPC/Lazarus occasionally on that platform).
MarkMLl