[fpc-pascal] Compiling FPC for SPARC

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Jul 31 17:06:00 CEST 2006


First, is this the best list to discuss this?

I've got rather agressive filtering in my mailing list gateway. If anybody tries
to send any attachments etc. to me please use markMLl.fpc2 .AT. telemetry .DOT.
co .DOT. uk.


I admit readily to being a beginner as far as FPC is concerned, and
inexperienced at Open Source development (SVN etc.) in general- SVN etc.

On an i386-linux system I've installed the FPC binaries in
/usr/local/fpc-2.0.2.i386 and the sources off ~/pascal/src (hence
~/pascal/src/fpc/compiler etc.) and can compile using "make cycle" to the point
where I can run the new fpc against hello.pp and get something that runs.
Questions at this stage:

*  Are there further validation tests available?
*  How can I build an installation bundle to move to a virgin machine?
*  What's the approved directory structure for an FPC binary+source tree
   for further work on e.g. Lazarus?

Moving to a SPARC (v8, 32-bit) system I installed the binaries in
/usr/local/fpc-2.0.0.sparc and the 2.0.2 sources similarly off ~/pascal/src.
Similarly running "make cycle" brought up a fairly obvious typo hence

0 2>markMLl at pye-dev-04:~/pascal/src/fpc/compiler/sparc$ diff -u cpupara.pas~
cpupara.pas
--- cpupara.pas~        2005-12-04 21:24:03.000000000 +0000
+++ cpupara.pas 2006-07-31 13:37:20.000000000 +0000
@@ -175,7 +175,7 @@
              begin
                p.funcretloc[side].loc:=LOC_REGISTER;
                { high }
-               if (side=callerside) (po_inline in p.procoptions) then
+               if (side=callerside) or (po_inline in p.procoptions) then
                 
p.funcretloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
                else
                 
p.funcretloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;

Hope that's the appropriate kind of diff, sorry about any wrap.


Fixing the above and starting over, make runs up to

make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
make[4]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl'
make -C ../rtl 'OPT=' all
make[4]: Entering directory `/home/markMLl/pascal/src/fpc/rtl'
make -C linux all
make[5]: Entering directory `/home/markMLl/pascal/src/fpc/rtl/linux'
as -o ../../rtl/units/sparc-linux/prt0.o sparc/prt0.as
as -o ../../rtl/units/sparc-linux/dllprt0.o sparc/dllprt0.as
as -o ../../rtl/units/sparc-linux/cprt0.o sparc/cprt0.as
as -o ../../rtl/units/sparc-linux/gprt0.o sparc/gprt0.as
/home/markMLl/pascal/src/fpc/compiler/ppc2 -Fi../inc -Fi../sparc -Fi../unix
-Fisparc -FE. -FU../../rtl/units
/sparc-linux -dsparc -Us -Sg system.pp
Free Pascal Compiler version 2.0.2 [2006/07/31] for sparc
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for SPARC
Compiling system.pp
sparc.inc(60,3)  msg nr 1018
An unhandled exception occurred at $0002EB9C :
EInvalidPointer : Invalid pointer operation
  $0002EB9C
  $0002C84C
  $0007217C
  $0004A4C0
  $000407DC
  $000103B0
An unhandled exception occurred at $00000030 :
An unhandled exception occurred at $000FF00B :
An unhandled exception occurred at $000FF003 :
..
An unhandled exception occurred at $000FF003 :
An unhandled exception occurred at $000FF003 :
An unhandled exception occurred at $000FF003 :
make[5]: *** [system.ppu] Illegal instruction
make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
make[4]: *** [linux_all] Error 2


I propose to hold off any more tinkering for a few hours pending any light that
anybody can throw on this, or suggested ways forwards.

Is there an archive of the 2.0.0 sources somewhere that I can run the 2.0.0
SPARC compiler against as a check?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list