How to install gnu ld on mac os x 10.6?

I have a lot of problems compiling the excellent Contiki OS on my macbook pro (with mac os x 10.6). Contiki actually uses many GNU-specific functions and options for GCC, AR, LD, etc. So I installed these utilities through macports, but it looks like "port install binutils" doesn't install GNU ld, does it?

So the question is, how do I get GNU ld on my mac? Is there a simple alternative to the hard path (i.e. wget, configure, make, make install method)?

+9
ld macos binutils
Oct 22 '09 at 15:25
source share
3 answers

As far as I can tell, GNU binutils does not support Mach-O format. None of the documentation mentions this, and some of them googing recent messages appear indicating that it is not supported.

Now you have mentioned Contiki OS, which looks like an embedded operating system. Do you need to compile the source executable, or are you trying to cross-compile some other environment? MacPorts includes several binutils ports for cross-compiling.

+10
Oct 24 '09 at 18:20
source share
 $ port info binutils
 (...) Tools are prefixed with g to avoid conflicts with original tools.  (...)
+2
Oct 22 '09 at 15:31
source share

Typically, you can directly link to gcc or g ++ and not need gld. Try installing LD to point to the compiler and see if it is bound to you.

0
Oct 24 '09 at 18:19
source share



All Articles