Re: "Bad CPU type" when building on G4
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry On Aug 20, 2007, at 3:28 PM, John Zorko <jmzorko@mac.com> wrote: Hello, all ... Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/tlambert%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... You are probably building both Intel and PPC as 64 bit, and you are lucking out on the Core 2 Duo being a 64 bit CPU and not noticing. Normally you have to specifically ask for 64 bit via -arch ppc64 -arch x86_64; if you are doing this, then you probably also want -arch i386 - arch plc ppc to build it 4-way universal (if you need it to be 64 bit for the address space on 64 bit machines, or to get twice as many registers for the compiler to use on Intel for performance reasons, etc,.). I'm working on an application that runs on Intel / PPC Macs (OSX) as well as Windows. When I build this app on my MacBook (Core2 Duo) or G5 (2.3ghz 970MP at work, dual 2.7ghz at home), the app runs. However, when I try to build and run it on a G4, it builds, but does not run. The error returned is "Bad CPU type for executable." The issue seems to be 64-bit vs. 32-bit. I've googled around and found references to --disable-multilib, but these references were always with respect to bootstrapping gcc. I'm not trying to build a new gcc, I just want to use the one that comes with OSX (Apple's gcc4.0.1). Will just passing "-m32" in the gcc parameters fix this? I'm trying this now, but this app takes hours to build on a G4 (1.33ghz 12" PowerBook), and I figure I might get an answer here before it's finished :-) This email sent to tlambert@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert