www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Compile options

reply Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
As far as I know, the default options for compiling the files for the
archive on Fedora and Debian does not include -fPIC. To compile PyD things
with ldc the .a archive has to have -fPIC since a shared object is being
created. Am I just building LDC from Git incorrectly?

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder     t:+44 20 7585 2200   voip:sip:
russel.winder ekiga.net
41 Buckmaster Road   m:+44 7770 465 077   xmpp:russel winder.org.uk
London SW11 1EN, UK  w: www.russel.org.uk skype:russel_winder
Jun 19 2015
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Friday, 19 June 2015 at 14:28:42 UTC, Russel Winder wrote:
 As far as I know, the default options for compiling the files 
 for the archive on Fedora and Debian does not include -fPIC. To 
 compile PyD things with ldc the .a archive has to have -fPIC 
 since a shared object is being created. Am I just building LDC 
 from Git incorrectly?
Shouldn't you be linking to the .so anyway? cmake ../ -DBUILD_SHARED_LIBS=true
Jun 19 2015
parent Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On Fri, 2015-06-19 at 18:56 +0000, John Colvin via digitalmars-d-ldc
wrote:
 On Friday, 19 June 2015 at 14:28:42 UTC, Russel Winder wrote:
 As far as I know, the default options for compiling the files=20
 for the archive on Fedora and Debian does not include -fPIC. To=20
 compile PyD things with ldc the .a archive has to have -fPIC=20
 since a shared object is being created. Am I just building LDC=20
 from Git incorrectly?
=20 Shouldn't you be linking to the .so anyway?
That would be my choice :-)
=20
 cmake ../ -DBUILD_SHARED_LIBS=3Dtrue
Aha, that is what I was missing. I should have guessed that. I shall claim that my brain is too highly trained. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jun 19 2015