상세 컨텐츠

본문 제목

Gcc Cross Compiler For Mac

카테고리 없음

by masguachopha1974 2020. 2. 22. 02:39

본문

Compiler

Currently defined only on Mac OS X systems running Apple's variant of the GNU C compiler. Do not rely on this macro to tell you that you are on Darwin or Mac OS X, since third-party compilers may not define this macro. _ _APPLE_CC_ _ When compiling for any Apple system. Integer value that corresponds to the (Apple) version of the compiler.

I am wondering if there is an elegant solution for cross-compiling for PowerPC from an Intel Mac platform. This is a strange request, but I want to build with GCC 3.x.x in C for classic MacOS and PPC GNU OS'es for an old PowerMac, which is soooo slow that I can't stand to compile on it, so i would like to use my Intel Mac to do it. I have tried to set up a PowerPC emulator to run some kind of OS that would let me do it, but the options (Qemu, PearPC and SheepShaver) are horribly unstable or won't run MacOS at all. The best solution so far is the OSX Intel + Qemu PPC emulator + Linux PPC + GCC 3.x.x = slightly faster than my old PPC machine. So is there any ability in Xcode to access Rosetta for cross compiling or some other sort of thing? Or perhaps something under X11?

Wow, you're complicating your life for nothing. You don't need any emulator to compile for another kind of processor, GCC does it since the beginning, you just need to set up the good options. What Xcode does is cross-compiling for Mac OS X PPC and Mac OS X Intel, it helps you to choose between those two, but for application that uses Apple frameworks. For command line tools or non-Cocoa/Carbon applications, you just have to put the right flags in GCC, I think you can even do that in Xcode without using Apple's feature. Look at GCC manual, you'll see architecture options and all the processors supported, which means, all the processor GCC can compile for whichever architecture it's running on. Wow, you're complicating your life for nothing. You don't need any emulator to compile for another kind of processor, GCC does it since the beginning, you just need to set up the good options.

What Xcode does is cross-compiling for Mac OS X PPC and Mac OS X Intel, it helps you to choose between those two, but for application that uses Apple frameworks. For command line tools or non-Cocoa/Carbon applications, you just have to put the right flags in GCC, I think you can even do that in Xcode without using Apple's feature.

G++ Compiler Mac

Look at GCC manual, you'll see architecture options and all the processors supported, which means, all the processor GCC can compile for whichever architecture it's running on. This all started because all my GCC cross builds from Intel to 60x powerpc have failed. I tried re-building GCC from scratch with the newer 4.2.1 version, but after compiling for a few hours, the build failed because with an error and crash related to the ext2fs extension that I had installed (as a side note. Is Apple planning to ever support ext2 filesystems?). So i will try building again after removing ext3fs and see what I can get to happen. I also found another open source compiler with Qemu as a backend, so I'll give that a try if GCC fails again.

Apple Footer. This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the.