[fpc-devel] Re: [MacPascal] FPC with XCode

Florian Klaempfl florian at freepascal.org
Thu Jun 16 17:30:44 CEST 2005


Jonas Maebe wrote:

> 
> On 16 jun 2005, at 17:12, Florian Klaempfl wrote:
> 
>>> The best way to solve this would be to compile the Free Pascal RTL 
>>> as  a
>>> shared library with an init routine that takes care of this. I  still
>>> have to add support for doing this to the Mac OS X port though.  I've
>>> recently found a way to do this which does not require PIC   support, so
>>> it should be fairly easy to add now.
>>
>>
>> Creating PIC isn't the hard part anymore.
> 
> 
> I already have a non-working patch to add PIC for PPC, but the  current
> PIC support we have is very incomplete. For example, PIC  access must be
> enabled for all constants which are put in the data  section (like fpu
> and string constants). Currently, those are still  directly accessed, so
> we only generate partial PIC code (which is  worse than no PIC code,
> because you get the slowdown in the places  where PIC is used without
> the ability to actually share code between  different programs).

Look how e.g. sparc it does. It is moved to cgcpu.fixreg/make_simple_ref and
cgcpu.loadaddr: if a symbol with type addr_full is passed, it simply "picifies" it.

Disuccions moved to fpc-devel ...




More information about the fpc-devel mailing list