[fpc-pascal] Compile fpc 64 bit from /fixes_3_2/

Pierre Muller pierre at freepascal.org
Tue Oct 8 17:03:02 CEST 2019



Le 08/10/2019 à 17:02, fredvs a écrit :
> Hello.
> 
> I have a strange result while compiling fpc from
> https://svn.freepascal.org/svn/fpc/branches/fixes_3_2/.
> 
> Here, on Linux Debian 10.1 multi-arch (64 bit + 32 bit), when I do
> compilation with that script:
> ------------------
> #!/bin/sh 
> 
> cd fixes_3_2
> 
> TARGET_VER=3.2.0 
> TARGET=x86_64-linux 
> COMPILER=/usr/lib/fpc/3.0.4/ppcx64
> 
> make clean
> make all FPC=$COMPILER OPT="-Fl/usr/local/lib" 
> make install INSTALL_PREFIX=/usr/lib/fpc/$TARGET_VER
> ------------------------
> 
> The script first clean everything and do the compilation of fpc with ppcx64
> and all seems ok.
> But, when the compilation is ok and a "new" ppcx64 is created, I dont know
> why, the process continue, remove all was already done, recompile all using
> ppc386 (fpc 32 bit) and finally only install new fpc 32 bit (ppc386).
> 
> The good news is that new installation of fpc.3.2. and ppc386 is working
> perfectly.
> 
> How to do to have the fpc 64 bit (ppcx64), why is it deleted using the above
> script?
> 
> I did try using this: make all FPC=$COMPILER CPU_TARGET=x86_64
> OPT="-Fl/usr/local/lib" 
> But, the same, the result is a fpc 32 bit (no 64 bit).
> 
> What is wrong?

  In your last line:
 make install INSTALL_PREFIX=/usr/lib/fpc/$TARGET_VER

you do not specify any FPC make variable value.

In such cases, the Makefile will look for fpc
binary in the path, probably find it as /usr/bin/fpc
and it will depend on which /usr/bin/fpc it is:

  If this binary is linked to the i386-linux installation,
it will give i386 as default CPU_TARGET and linux as OS_TARGET,
and you will thus use ppc386 executable to recompile everything.

  I suppose this all comes from the fact that the x86_64 Free pascal
was installed before the i386 version, thus overwriting the x86_64 version of fpc binary.

  You can fix your problem simply by adding explicitly
 FPC=$COMPILER
to the make install line.

Pierre


More information about the fpc-pascal mailing list