On 08/18/2015 01:24 AM, Michael Ring wrote:
This is how I build fpc trunk cross compiler:
echo "Building fpchf-linux from trunk"
SUBARCH=armv7
CROSSOPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A
-O2 -OoFASTMATH -XX -Xs"
//CROSSOPT="-dREVINC -dFPC_ARMHF -CX -CpARMV6 -CfVFPV2 -OpARMV6 -O2
-OoFASTMATH -XX -Xs"
OPT="-dFPC_ARMHF"
make clean buildbase CROSSINSTALL=1 OS_TARGET=linux CPU_TARGET=arm
OPT="$OPT" OVERRIDEVERSIONCHECK=1 CROSSOPT="$CROSSOPT"
BINUTILSPREFIX=arm-linux-gnueabihf- || exit 1
sudo make installbase CROSSINSTALL=1 OS_TARGET=linux CPU_TARGET=arm
OPT="$OPT" OVERRIDEVERSIONCHECK=1 CROSSOPT="$CROSSOPT"
BINUTILSPREFIX=arm-linux-gnueabihf- || exit 1
sudo mv /usr/local/lib/fpc/3.1.1/ppcrossarm
/usr/local/lib/fpc/3.1.1/ppcrossarmhf
Please note that the rtl is fine for Raspberry Pi 2 (the new quad core
board) as this is a version that uses armv7 commandset.
For old Raspberry Pi you need to use the commented out CROSSOPT, this
will create rtl that is suitable for old raspberries.
You should not try to use fpc 2.6.4 as this compiler does not support
armhf. Most likely the 3.0 pre-release will compile the same way, but
I never tried.
You need to have cross-binutils installed as you need
arm-linux-gnueabihf-* tools to be able to successfully compile.
Michael
Hi Michael,
Just to make sure, I run the script on the desktop right? just to make
sure its not to be ran on the Pi.
Thanks again!
Chris
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal