[fpc-pascal] Fpc make questions...

Tomas Hajny XHajT03 at hajny.biz
Sat Sep 12 01:54:20 CEST 2020


On 2020-09-11 21:51, Bo Berglund via fpc-pascal wrote:
> I am not very informed about how make works when building fpc
> installations, I have just used commands I have gathered online and it
> has worked...
> 
> Now I would like to know:
> 1) Does make clean inside the fpc source dir erase ALL of the binaries
> produced by an earlier build inside that source tree?

Yes, as long as the same target is involved. If you want to clean for 
results of possible cross-compilations as well, use 'make distclean'.


> 2) If so, does these two versions of "make all" build for ARMv7 and
> ARMv6 respecitively:
> make all FPC=/home/pi/dev/ppcarm OPT="-dFPC_ARMHF"
> make all FPC=/home/pi/dev/ppcarm OPT="-dFPC_ARMHF -CpARMV6 -OpARMV6"

I know nothing about ARM thus I can't answer this one.


> 3) Does the following command overwrite existing files from an earlier
> attempt so the CPU target can be replaced?
> For ARMv7:
> make install OPT="-dFPC_ARMHF" PREFIX=/home/pi
> FPC="/home/pi/dev/ppcarm"
> For ARMv6:
> make install OPT="-dFPC_ARMHF -CpARMV6 -OpARMV6" PREFIX=/home/pi
> FPC="/home/pi/dev/ppcarm"

If you perform 'make all' before running 'make install', then you 
probably don't need the OPT=... parameter for 'make install'.


> 4) Do I also need to switch the seed compiler /home/pi/dev/ppcarm
> (3.0.4) between v6 and v7 or can any of the two work to build
> correctly fpc itself?

No - as long as the seed compiler works on your machine and is supported 
by the makefiles (i.e. isn't too old), you can use the same seed 
compiler. Preferably, you should use a seed compiler from the last 
official release for your platform.


> The reason I am asking is that I need to switch my system from
> building ARMv7 binaries to build ARMv6 binaries and I don't want to
> start over from scratch on this RPi, which I have used for some
> time...
> 
> Hopefully
> 
> make clean
> make all
> make install
> 
> with the proper options will do the trick....
> TIA..

They should.

Tomas



> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


More information about the fpc-pascal mailing list