views:

47

answers:

1

The odcctools package provides binutils for the Darwin OS. -- this allows you to cross compile to Darwin and OSX for example. However, odcctools does not seem to build properly on 64-bit OSes:

./../expr.c: In function ‘expression’:
./../expr.c:311: error: ‘union <anonymous>’ has no member named ‘n_name’

Or, if you set CFLAGS to -m32, you get this:

/usr/bin/ld: skipping incompatible ../libstuff/libstuff.a when searching for -lstuff
/usr/bin/ld: cannot find -lstuff

How do you build this on a 64-bit OS?

A: 

The way the odcctools makeflags are set up, you can't use CFLAGS -- you have to set both CC and CXX:

CC="gcc -m32" CXX="g++ -m32" ./configure blah blah blah

Note that I had to add a -fpermissive to my CXX to get it to run but this may not be necessary!

Also, you may be interested in this post (although it wasn't sufficient for my setup).

(If anyone has a better way to do this please let me know!)

wickedchicken