Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-09

PIC support for x86_64

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dominique Leducq

Could someone please tell me about the status of PIC support for x86_64 in FPC ?

Is it supported in fpc 2.0.4 ?
Is it supposed to work in 2.1.1 ? If yes, which revision(s) ? If no, will it be any time soon ?

I need to produce a shared library for x86_64 Linux with fpc. AFAIK, GNU ld needs PIC to link a shared library for x86_64.

So I need to know quite rapidly about that matter, in order to take appropriate decisions.

Thanks for your answers,

Dominique Leducq

Reply by email

Florian Klaempfl
to Dominique Leducq
Dominique Leducq wrote 6 lines
Could someone please tell me about the status of PIC support for x86_64 in FPC ? Is it supported in fpc 2.0.4 ? Is it supposed to work in 2.1.1 ? If yes, which revision(s) ? If no, will it be any time soon ?

It is supposed to work in 2.1.1 trunk.

Show quoted text 16 lines
I need to produce a shared library for x86_64 Linux with fpc. AFAIK, GNU ld needs PIC to link a shared library for x86_64. So I need to know quite rapidly about that matter, in order to take appropriate decisions. Thanks for your answers, Dominique Leducq _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Dominique Leducq
to Florian Klaempfl
Florian Klaempfl wrote 30 lines
Dominique Leducq wrote: > Could someone please tell me about the status of PIC support for x86_64 > in FPC ? > > Is it supported in fpc 2.0.4 ? > Is it supposed to work in 2.1.1 ? If yes, which revision(s) ? If no, > will it be any time soon ? > It is supposed to work in 2.1.1 trunk. > I need to produce a shared library for x86_64 Linux with fpc. > AFAIK, GNU ld needs PIC to link a shared library for x86_64. > > So I need to know quite rapidly about that matter, in order to take > appropriate decisions. > > Thanks for your answers, > > Dominique Leducq > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel >

So here are the results of my tests : PIC compilation for x86_64 with Fpc 2.1.1 is broken since revision 3902 (june 20), that is since the default assembler switched from GNU As (gas) to internal one. Compiling with -Cg -Aas actually works.
Without -Aas, there is no difference in the object code generated wether you use the -Cg flag or not, and you get an "recompile with -fPIC" error when trying to link a DSO with GNU ld.

Dominique Leducq

Reply by email