I have decided to push daily builds for the latest and greatest version of the Freepascal compiler to http://freepascal.thaddy.co.uk/raspberrypi.html
The reason for that is that the official Freepascal distribution for Raspbian is many, many versions behind and trunk contains many, many language improvements and optimizations.
There is a win32 to armhf standalone crosscompiler for those that need just that and there is a full package including all libraries that runs on the Raspberry Pi itself. It doesn't include the sourcecode. You can obtain the sources with svn from freepascal.org.
Current revision is fpc271 - R27169
To install, delete any ppcarm
, extract the archive and copy the contained directories to /usr/local. That would be /usr/local/bin
Then create these links:
sudo ln -sf /usr/local/lib/fpc/2.7.1/ppcarm /usr/local/bin/ppcarm
sudo ln -sf /usr/local/lib/fpc/2.7.1/samplecfg /usr/local/bin/samplecfg
When I have the time, I wil probably include this in a script and maybe even a distribution as a deb.
These releases are unofficial and they do not include Lazarus. Just the textmode IDE (FP).
But they are cutting edge and fresh from the press.
If you want to compile it yourself, first download and install the full compiler as explained above.
Then make sure subversion is installed and checkout the sources from freepascal.org:
// first time install subverion: sudo apt-get install subversion
// first time checkout the sources: svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
// after that, for future builds you need to just update the sources
sudo make clean all distinstall OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV6 -CfVFPV2 -CaEABIHF -OpARMV6 -O2 -OoFASTMATH -XX -Xs"
Then delete fpcarm
and create the symlinks as explained above.
This will give you a full installation in /usr/local
You still have to create the two links above.
To check if everything went to plan - provided the make didn't throw any errors - , you can start fp
(just type fp in a terminal ) and check the revision number in the aboutbox...
I do not supply any support on these builds!
But I may answer questions here or on the freepascal mailinglist.
It is NOT recommended to do the daily builds yourself, not on an SD card anyway.
It will ruin the card very quickly. I compile on an external disk and push it through a script to my website.
(Which for now looks like sh*t, but at least now it serves a purpose. It lay dormant for years.)