Never mind, I seem to have guessed right sayingL
FPC=

Sam

Sam Liddicott wrote:
> All the instructions I can find on building a cross compiler say to pas
> CPU_TARGET and OS_TARGET as makefile parameters.
> (According to:
> http://wiki.lazarus.freepascal.org/Cross_compiling
> http://wiki.freepascal.org/WinCE_port
> etc)
>
> But when I use this notation, the make fails because it can't find the
> to-be-build binary already built:
>
>  make clean all CPU_TARGET=arm OS_TARGET=OS_TARGET
> Makefile:129: *** Compiler ppcrossarm not found. Stop.
>
> Of course it can't find ppcrossarm, it's supposed to be building ppcrossarm!
>
> It doesn't matter if I use make target crossall or pass CROSSCOMPILE=1
> it still complains
>
>
> When I look in the makefile, it is built like that:
>
> ifndef FPC
> FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
> ifneq ($(FPCPROG),)
> FPCPROG:=$(firstword $(FPCPROG))
> ifneq ($(CPU_TARGET),)
> FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
> else
> FPC:=$(shell $(FPCPROG) -PB)
> endif
>
> So if I specify CPU_TARGET I must also specify FPC, but the makefile
> seems very devoted to working out what FPC should be, so I hate to
> override it like that.
>
> Perhaps this is only problem when building the compiler itself?
>
> But this still doesn't seem to compile arm; the build output shows
> things like:
> # make --debug=vij crossall  CPU_TARGET=arm OS_TARGET=wince
> FPC=/usr/bin/ppc386
> ...
> ...
> /tmp/fpc_patchdir/fpc/compiler/ppc -Ur -Ur -Xs -O2 -n -Fi../inc
> -Fi../i386 -Fi../unix -Fii386 -FE.
> -FU/tmp/fpc_patchdir/fpc/rtl/units/i386-linux -di386 -dRELEASE
> ../objpas/fmtbcd.pp
>
> I guess my invocation is supposed to be for building the rtl and such
> like, not actually building a cross compiler.
>
> Which doesn't explain all the wiki pages using this notation to build
> the cross compiler....
>
> How should one tell the makefile to build a cross compiler, i.e. that
> runs on the native CPU/OS but compiles code for the new CPU/OS
>
> Sam
>
>   

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to