[fpc-devel] Porting fpc to linux-sparc64

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Mon May 29 10:52:21 CEST 2017


On Mon, May 29, 2017 at 10:37:42AM +0200, John Paul Adrian Glaubitz wrote:
> > Although we still seem to have a stable 3.0.2 release. Can you try
> > if the stable release built by us works on your system? Any binary
> > from this.
> > 
> > ftp://ftp.freepascal.org/pub/fpc/dist/3.0.2/sparc-linux/
> 
> Running the IDE (fp) and the compiler (ppcsparc) works, although I did
> not perform any extensive tests:
> 
> glaubitz at deb4g:~/fpc-3.0.2$ ./lib/fpc/3.0.2/ppcsparc
> Free Pascal Compiler version 3.0.2 [2017/05/07] for sparc
> Copyright (c) 1993-2017 by Florian Klaempfl and others
> /home/glaubitz/fpc-3.0.2/lib/fpc/3.0.2/ppcsparc [options] <inputfile>
> [options]
>  Put + after a boolean switch option to enable it, - to disable it.
>  (...)

Trying to build fpc with the pre-compiled binaries fails with said
linker issues:

make[6]: Entering directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
/usr/bin/ppcsparc -Ur -Xs -O2 -n -Fusparc -Fusystems -Fu/root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux -Fisparc -FE. -FUsparc/units/sparc-linux -dRELEASE @/root/fpcp
/usr/bin/ld: warning: ./link.res contains output sections; did you forget -T?
/usr/bin/ld: skipping incompatible /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/prt0.o when searching for /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/pro
/usr/bin/ld: cannot find /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/prt0.o
/usr/bin/ld: skipping incompatible sparc/units/sparc-linux/msg2inc.o when searching for sparc/units/sparc-linux/msg2inc.o
/usr/bin/ld: skipping incompatible ./sparc/units/sparc-linux/msg2inc.o when searching for sparc/units/sparc-linux/msg2inc.o
/usr/bin/ld: cannot find sparc/units/sparc-linux/msg2inc.o
/usr/bin/ld: skipping incompatible /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/system.o when searching for /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/o
/usr/bin/ld: cannot find /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/system.o
/usr/bin/ld: skipping incompatible /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/strings.o when searching for /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linuxo
/usr/bin/ld: cannot find /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/strings.o
msg2inc.pp(810,51) Error: Error while linking
msg2inc.pp(810,51) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:3858: recipe for target 'msg2inc' failed
make[6]: *** [msg2inc] Error 1
make[6]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
Makefile:3860: recipe for target 'msgtxt.inc' failed
make[5]: *** [msgtxt.inc] Error 2
make[5]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
Makefile:3973: recipe for target 'next' failed
make[4]: *** [next] Error 2
make[4]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
Makefile:3978: recipe for target 'ppc1' failed
make[3]: *** [ppc1] Error 2
make[3]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
Makefile:3990: recipe for target 'cycle' failed
make[2]: *** [cycle] Error 2
make[2]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc/compiler'
Makefile:2783: recipe for target 'compiler_cycle' failed
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory '/root/fpc/fpc-3.0.0+dfsg/fpcsrc'
debian/rules:304: recipe for target 'build-arch-stamp' failed
make: *** [build-arch-stamp] Error 2
root at deb4g:~/fpc/fpc-3.0.0+dfsg#

Running the file utility on one of the object files shows that the
assembler did not generate 32-bit code. So, at least a hotfix here
would be to pass "-m32" to the assembler.

root at deb4g:~/fpc/fpc-3.0.0+dfsg# file /root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/strings.o
/root/fpc/fpc-3.0.0+dfsg/fpcsrc/rtl/units/sparc-linux/strings.o: ELF 64-bit MSB relocatable, SPARC V9, relaxed memory ordering, version 1 (SYSV), not stripped
root at deb4g:~/fpc/fpc-3.0.0+dfsg#

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



More information about the fpc-devel mailing list