Problems with mac unified bin distribution

Help
proj_
2007-02-20
2013-04-18
  • proj_
    proj_
    2007-02-20

    So although the mac gcc 4.0.1 distribution aims to support OSX 10.3 there is one problem  , namely using built-in '/usr/bin/ld'.

    Here is the output of compiling a simple program (all executable link phases fail with the latest bits)

    /usr/local/gdc/bin/gdmd -v -v1 -g -ofcb cb_d.o cb_c.o
    Using built-in specs.
    Reading specs from /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.spec
    rename spec lib to liborig
    Target: powerpc-apple-darwin8
    Configured with: /Users/dvdf/Data/Staging/r0.22rc2/gcc-5363/build/obj/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,c++,d --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin8 --program-prefix= --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
    Thread model: posix
    gcc version 4.0.1 (Apple Computer, Inc. build 5363) (gdc 0.22, using dmd 1.004)
    /usr/local/gdc/bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/collect2 -dynamic -arch ppc -macosx_version_min 10.3 -multiply_defined suppress -weak_reference_mismatches non-weak -o cb -lcrt1.o /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/crt2.o /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/crt3.o -L/usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1 -L/usr/local/gdc/bin/../lib/gcc -L/usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../.. -L/usr/lib/gcc/.. cb_d.o cb_c.o -lgphobos -lgcc_s.10.4 -lgcc -lm -lSystemStubs -lSystem
    /usr/bin/ld: unknown flag: -macosx_version_min
    collect2: ld returned 1 exit status
    make: *** [cb] Error 1

    If I attempt to link manually by removing the macosx_version_min flag I run into a few more issues (possibly related)?

    first:
    /usr/bin/ld: can't locate file for: -lgcc_s.10.4

    second:
    /usr/bin/ld: can't locate file for: -lSystemStubs

    At this point I've complete hosed the link for sure but here is the final error messages for fun:

    /usr/bin/ld: /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.a(deh.o) malformed object (stray relocation PAIR entry (1) in section (__TEXT,__eh_frame))
    /usr/bin/ld: /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.a(deh.o) malformed object (stray relocation PAIR entry (3) in section (__TEXT,__eh_frame))
    /usr/bin/ld: /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.a(deh.o) malformed object (stray relocation PAIR entry (5) in section (__TEXT,__eh_frame))
    /usr/bin/ld: /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.a(deh.o) malformed object (stray relocation PAIR entry (7) in section (__TEXT,__eh_frame))
    /usr/bin/ld: /usr/local/gdc/bin/../lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgphobos.a(deh.o) malformed object (stray relocation PAIR entry (9) in section (__TEXT,__eh_frame))

    I'll probably sync and do a build to try and get my own compiler running in the short term but hopefully this can be fixed in the binary dist.

     
    • I'm not sure the GCC 4.0.1 distribution supports 10.3 or earlier, I think it is for 10.4 only ?