[fpc-devel] DF64 BSD -- FPC running natively but argument address mangling prevents bootstrap

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 18 14:38:37 CET 2014


On 18/11/14 13:00, John Marino wrote:
> Since DragonFly uses the FreeBSD ports collection, the plan was to start
> with patches there and then get most of them into the repository (x86_64
> only).  However I hit a snag in the middle of the bootstrapping process
> and I could use some help.  It won't compile because it can't find the
> units, but it can't find the units because it can't properly find out if
> a directory exists.
> 
>> > bin/fpc -vut
> 	Configfile search: /home/marino/.fpc.cfg
> 	Configfile search: /usr/local/etc/fpc.cfg
> 	Reading options from file /usr/local/etc/fpc.cfg
> 	Path "./lib/fpc/2.6.4/units/x86_64-dragonfly/" not found
> 	Path "./lib/fpc/2.6.4/units/x86_64-dragonfly/*/" not found
> 	Path "./lib/fpc/2.6.4/units/x86_64-dragonfly/rtl/" not found
> 	Path "/home/marino/.fppkg/lib/fpc/2.6.4/units/x86_64-dragonfly/*/" not
> found
> 	Path "/usr/lib/" not found
> 	Path "/lib/" not found
> 	Free Pascal Compiler version 2.6.4 [2014/11/18] for x86_64
> 	Copyright (c) 1993-2014 by Florian Klaempfl and others
> 	Fatal: No source file name in command line
> 	Fatal: Compilation aborted
> 	Error: bin/ppcx64 returned an error exitcode (normal if you did not
> specify a source file to be compiled)

Such problems usually mean that the stat or statfs record needs
adjustments. You can find the "stat" record definition in
rtl/bsd/ostypes.inc. statfs is in rtl/<yourosdir>/ptypes.inc

> I've narrowed down the problem to a malfunctioning strpas command, and
> further to the "move" command.

This is probably an issue of gdb being confused about formal parameters.
I think @formalpara will get you the location on the stack of that
parameter (it's passed in a register in that case, but FPC will copy it
back to the stack locally if you compile without optimisations), not its
value.

Parameter passing on x86-64 is identical for all platforms except for
Win64, so it would be very strange if it went wrong in such a common
routine only on your new platform.


Jonas



More information about the fpc-devel mailing list