Default linker changed when installing GCC 5.3.0 on Tiger
ryandesign at macports.org
Tue Apr 26 14:58:31 PDT 2016
On Apr 26, 2016, at 4:31 PM, César wrote:
> After installing GCC 5.3.0 in Tiger, I realized that if I invoke ld from the command line, I'm actually invoking /opt/local/bin/ld. I realize that GCC 5.3.0 may require a newer linker than the default in Xcode for Tiger, but even if I select GCC 4.0.1 as the current compiler, ld still invokes /opt/local/bin/ld.
> Is there any way I can select /usr/bin/ld as the default linker when I'm not using GCC 5.3.0?
Tiger is so old that all the compilers included in its Xcode are too old and buggy for MacPorts to use. So MacPorts installs and uses the apple-gcc42 port and uses that compiler to build all ports on Tiger (unless a port specifies otherwise). The apple-gcc42 port requires the ld64 port, which is where /opt/local/bin/ld comes from. You should probably use /opt/local/bin/ld and the gcc installed by the apple-gcc42 port, even for things you compile on Tiger outside of MacPorts, rather than the ancient versions that come in Tiger's Xcode.
More information about the macports-users