Error when building universal binary

Anders F Björklund afb at algonet.se
Tue Aug 5 12:00:41 PDT 2008


Jacob Carlborg wrote:

> I'm using the "-arch" option and I get this error:
> cc1d: error: unrecognized command line option "-arch"
> (it doesn't matter if I use gdc or gdmd)
> 
> Doesn't gdc support the "-arch" option? I thought that if it worked with 
> gcc it would also work with gdc.

FSF's GCC does not support this, but Apple's GCC does.
(the "gdcmac" builds use the Apple GCC instead of FSF)

When building with the "regular" GCC, you instead run
one cross-compilation with powerpc-apple-darwin9-gdc
and one cross-compilation with i686-apple-darwin9-gdc,
and then lipo(1) the resulting two objects together...

Apple's GCC has a frontend that does all this for you.
i.e. gdc -arch ppc -arch i386 will call the above two

--anders


More information about the D.gnu mailing list