[fpc-devel] fpc libraries do not work in freeBSD...

Tomas Hajny XHajT03 at hajny.biz
Wed Aug 6 00:24:07 CEST 2014


On 6 Aug 14, at 0:03, Fred van Stappen wrote:

> > Could it be feasible to compile a "custom" fpc, so i could compile libraries for freeBSD 10 ?
> > 
> > Startup files can be exchanged without recompiling everything. Just
> > overwrite the .o with the newly assembled ones.
> 
> Ok, many thanks Marco. ;-)
> 
> So, according with Michal Wallace solution (hope i understood) :=>
> >> http://lists.freepascal.org/pipermail/fpc-devel/2013-November/032950.html
> 
> I will exchange part of code of dllprt0.as with some of prt0.as =>
> 
> Change that :
> 
> .weak operatingsystem_parameter_argc
> .weak operatingsystem_parameter_argv
> .weak operatingsystem_parameter_envp
> 
> with that :
> 
> .global operatingsystem_parameter_envp
> .global operatingsystem_parameter_argc
> .global operatingsystem_parameter_argv
> .set operatingsystem_parameter_envp,operatingsystem_parameters+0
> .set operatingsystem_parameter_envp,operatingsystem_parameters+0
> .set operatingsystem_parameter_envp,operatingsystem_parameters+0

I may be completely wrong, but the last three identical lines look 
strange to me. I'd assume that either having it just once should be 
OK, or that the latter two should be in fact different (in 
particular, refer to argc and argv rather than envp and probably also 
contain a different offset at the end).

Tomas




More information about the fpc-devel mailing list