On 08/20/2015 03:16 PM, Jonas Maebe wrote:
Chris Moody wrote:
To further add to the confusion, I found my Raspberry did not have
locate installed, so I asked apt-get to get a copy and it obtained:

Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...

I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and
going by Jim's blog I'm running an armhf system.

So I don't know what I have :(.

That indeed suggests you have an armhf system. I really don't get why it's installing an ARMEL compiler. Please file a bug with Raspbian about that.

You can bootstrap an armhf 3.0 compiler on an armel system, but it's a bit tricky:
1) install the armel compiler (you already did that
2) build FPC with OPT="-dFPC_ARMHF" FPCMAKEOPT="-dNO_THREADING"

This last parameter removes the libc dependency from fpmake, so it won't need the _init and _fini symbols. It does not remove threading support from the RTL itself, so that's fine.

This way, FPC 3.0 should build successfully, and you should end up with an FPC 3.0 ARMHF compiler. You can verify it by running "./fpcsrc/compiler/ppcarm -l nonexisting.pp" afterwards and checking that it says it targets ARMHF.

If that is the case, install it in a subdirectory of your home directory (make ... install INSTALL_PREFIX=$HOME/somedir), create a symbolic link from $HOME/somedir/bin/ppcarm to $HOME/somedir/lib/fpc/3.0/ppcarm, add $HOME/somedir/bin to the front of your path, and finally add the following lines to ~/.fpc.cfg

#ifdef VER3_0
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/rtl
#endif

That should enable you to use both "fpc" and "ppcarm" to compile programs using this newly built FPC 3.0.


Jonas

./ppcarm -l nonexisting.pp
Free Pascal Compiler version 3.0.0rc1 [2015/08/20] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling nonexisting.pp
Fatal: Cannot open file "nonexisting.pp"
Fatal: Compilation aborted

Yay! thanks for all the help everyone!

Chris
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to