www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1057] New: Can't build on x86_64 without --disable-shared

reply d-bugmail puremagic.com writes:

           Summary: Can't build on x86_64 without --disable-shared
           Product: DGCC aka GDC
           Version: 0.23
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: ndbecker2 gmail.com

Can't build on x86_64 without --disable-shared.  Using --disable-shared builds
a non-PIC version of libgphobos, and this can't be used to build shared object

Mar 12 2007
parent d-bugmail puremagic.com writes:

------- Comment #1 from martinxyz gmx.ch  2007-10-27 16:03 -------
I can build without --disable-shared, but when trying to create a -shared
object the linker tells me that I have to rebuild phobos with -fPIC.

As a workaround you can compile everything with -fPIC, which should not hurt so
much on AMD64. Execute this command in the gcc directory (not in gcc/d/ but
gcc/d/ must already exist):

find -name 'configure*' |grep -v .svn | xargs perl -p -i -e 's/-O2/-O2 -fPIC/g'

I really hope someone will find a clean solution.

Oct 27 2007