Discussion:
Bootstrapping for ppc64el
(too old to reply)
John Paul Adrian Glaubitz
2017-05-29 20:34:17 UTC
Permalink
Raw Message
Hi!

I'm now trying to bootstrap fpc for ppc64el which unfortunately fails.

I'm using this command line:

BINUTILSPREFIX=powerpc64le-linux-gnu- make crossall crossinstall CPU_TARGET=powerpc64 CROSSOPT="-CaELFV2 -dFPC_LITTLE_ENDIAN" OS_TARGET=linux
FPC=/usr/lib/fpc/3.0.0/ppcx64 INSTALL_PREFIX=/root/fpc-ppc64el/

/root/trunk/compiler/ppcrossppc64 -Ur -Ppowerpc64 -XPpowerpc64le-linux-gnu- -Xr -XX -CX -Ur -Xs -O2 -n -Fi../inc -Fi../powerpc64 -Fi../unix -Fipowerpc64 -FE.
-FU/root/trunk/rtl/units/powerpc64-linux -dpowerpc64 -dRELEASE -CaELFV2 -dFPC_LITTLE_ENDIAN ../objpas/character.pas
unicodedata_be.inc(5,106) Error: Illegal order of record elements
unicodedata_be.inc(5,109) Fatal: Syntax error, "identifier" expected but ";" found
Fatal: Compilation aborted

Building without -dFPC_LITTLE_ENDIAN produces a binary which doesn't work on
an actual ppc64el machine:

***@plummer:~$ ./ppcppc64
-bash: ./ppcppc64: cannot execute binary file: Exec format error
***@plummer:~$

Looks like the generated executable is big-endian:

***@plummer:~$ file ./ppcppc64
./ppcppc64: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
***@plummer:~$

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-deve
John Paul Adrian Glaubitz
2017-05-29 20:55:33 UTC
Permalink
Raw Message
Post by John Paul Adrian Glaubitz
Building without -dFPC_LITTLE_ENDIAN produces a binary which doesn't work on
Aha. Passing "-Cb-" works and yields a little-endian binary.
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.or
Loading...