D.gnu - Error when building universal binary
- Jacob Carlborg (8/8) Aug 05 2008 I'm trying to build a universal binary on Mac OS X 10.5.4 using the gdc
- Anders Bergh (6/14) Aug 05 2008 The gdc in the bundle probably doesn't have the Apple gcc patches,
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (10/16) Aug 05 2008 FSF's GCC does not support this, but Apple's GCC does.
- Jacob Carlborg (2/23) Aug 06 2008 ok
- Jacob Carlborg (3/24) Aug 07 2008 Can I assume that the -framework option doesn't work? It seems that it
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/10) Aug 10 2008 I was under the impression that it should work with GCC 4.x (for earlier
- David Friedman (5/19) Aug 10 2008 The FSF GCC (4.0 and later, at least) simply passes the -framework
- Jacob Carlborg (2/16) Aug 11 2008 I'll try that
I'm trying to build a universal binary on Mac OS X 10.5.4 using the gdc bundle from the tango website: http://www.dsource.org/projects/tango/wiki/GdcDownloads 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.
Aug 05 2008
On Tue, Aug 5, 2008 at 4:10 PM, Jacob Carlborg <doobnet gmail.com> wrote:I'm trying to build a universal binary on Mac OS X 10.5.4 using the gdc bundle from the tango website: http://www.dsource.org/projects/tango/wiki/GdcDownloads 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.The gdc in the bundle probably doesn't have the Apple gcc patches, it's pretty easy to compile your own gdc using the gcc from developer.apple.com/opensource though... and that will support -arch. -- Anders
Aug 05 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
Aug 05 2008
Anders F Björklund wrote:Jacob Carlborg wrote:okI'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
Aug 06 2008
Anders F Björklund wrote:Jacob Carlborg wrote:Can I assume that the -framework option doesn't work? It seems that it doesn't but I don't get an error.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
Aug 07 2008
Jacob Carlborg wrote:Can I assume that the -framework option doesn't work? It seems that it doesn't but I don't get an error.I was under the impression that it should work with GCC 4.x (for earlier versions I made a patch for FSF GCC 3.3.5) But there are two things that -framework does, it adds a search patch for includes (like -I) and it adds a library and a search path for libraries (like -L) to the linker. Maybe the vanilla -framework support in FSF GCC "forgets" the linker ? You can make it add it by using something like "-Wl,-framework,Carbon" --anders
Aug 10 2008
Anders F Björklund wrote:Jacob Carlborg wrote:The FSF GCC (4.0 and later, at least) simply passes the -framework option to the linker so it "just works". I think the only change in the Apple version is to require an argument after the option. DavidCan I assume that the -framework option doesn't work? It seems that it doesn't but I don't get an error.I was under the impression that it should work with GCC 4.x (for earlier versions I made a patch for FSF GCC 3.3.5) But there are two things that -framework does, it adds a search patch for includes (like -I) and it adds a library and a search path for libraries (like -L) to the linker. Maybe the vanilla -framework support in FSF GCC "forgets" the linker ? You can make it add it by using something like "-Wl,-framework,Carbon" --anders
Aug 10 2008
Anders F Björklund wrote:Jacob Carlborg wrote:I'll try thatCan I assume that the -framework option doesn't work? It seems that it doesn't but I don't get an error.I was under the impression that it should work with GCC 4.x (for earlier versions I made a patch for FSF GCC 3.3.5) But there are two things that -framework does, it adds a search patch for includes (like -I) and it adds a library and a search path for libraries (like -L) to the linker. Maybe the vanilla -framework support in FSF GCC "forgets" the linker ? You can make it add it by using something like "-Wl,-framework,Carbon" --anders
Aug 11 2008