On Wed, 12 Dec 2007 22:40:25 +0000
Sam Liddicott <[EMAIL PROTECTED]> wrote:
> This message contains a progress report, and some more questions:
>
> Progress
> ======
>
> Thanks to Vincent, using fpc as the compiler, and using this spell in
> /etc/fpc.cfg (which will be added to the default fpc package)
>
> echo '#include /usr/lib/fpc/2.3.1/fpc-cross.cfg' >> /etc/fpc.cfg
Please replace the version number with $fpcversion.
> and then the file /usr/lib/fpc/2.3.1/fpc-cross.cfg can have 1
> #include per cross compiler e.g.
>
> #include /usr/lib/fpc/2.3.1/fpc.powerpc-linux.cfg
>
> these will be easy to add and remove with postinst and postrm for
> package managers.
>
> A typical file might be:
>
>
> $ cat /usr/lib/fpc/2.3.1/fpc.powerpc-linux.cfg
>
> # Detect powerpc-linux compiles
> #IF $fpc-target = powerpc-linux
> -XPpowerpc-linux-gnu-
> #WRITE binutils prefix powerpc-linux-gnu-
> #END
>
>
> The actual -XP entry will depend on what the binutils prefix was when
> the cross compile package was actually built.
>
> THAT much works; so merely installing a cross-compiler deb will let
> lazarus just pick it up and run....
Nice. Just like the existing fpc_crosswin32 package, but finally for
more platforms. :)
> Problems
> ======
>
> However the next problems: rebuilding lazarus (lcl etc) is done by a
> makefile, e.g.:
>
> /usr/share/lazarus/lcl/ && /usr/bin/make clean all -w
> CPU_TARGET=powerpc
>
> fpc is not called by the makefle, so /etc/fpc.cfg is not read, and of
> course this needs adding:
> BINUTILSPREFIX=powerpc-linux-gnu-
>
> or whatever the prefix actually needs to be; but thats too long
> winded; we already solved this problem by using fpc.
>
> So... I guess I need to find out why /usr/bin/ppcrossppc is being
> used directly and not fpc...
>
> And why lazarus insists on making clean and making
> in /usr/share/lazarus even though I'm not root and don't have write
> access, but that can come later...
Probably because /usr/share/lazarus is set in the environment options as
lazarus directory and you told the IDE to rebuild the LCL.
The LCL can still only be built via the Makefile and this is not very
flexible. Eventually when the LCL is changed to a normal lazarus package
it will be possible to build the LCL, even if the LCL was installed as
root.
> And then (finally, please let it be finally) where cprt21.o is or
> comes from for powerpc. Maybe I missed it in the cross-deb?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives