Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

So far I've successfully launched the configure, but when I type make, I get the following error, after some time (there's a lot which compile successfully):

ld: unknown/unsupported architecture name for: -arch i686
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libgcc_s.dylib] Error 1
make[1]: *** [libgcc.a] Error 2
make: *** [all-gcc] Error 2

Is there a way to tell gcc not to compile itself for the i686 architecture?

Here's my uname -a if it can help:

Darwin Frizlabs-Computer.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64

PS: I know gcc-4.0 is ancient, but I do need it.

share|improve this question
    
Wh do you need gcc 4.0, surely better to fix that reason, and perhaps easier –  Mark Nov 3 '12 at 12:28
    
I want to compile SheepShaver, which is a complex project and only compiles (AFAIK) with gcc-4.0. Trust me, if I could avoid compiling gcc-4.0, I would! –  Frizlab Nov 3 '12 at 13:31
    
The macports port of sheepshaver seems to use the standard Apple compiler and the home page seems to show no need for gcc 4.0 (+ there are binaries there) –  Mark Nov 3 '12 at 13:37
    
Using the default compiler (clang) does not work at all (the compiler crashes while compiling! I've submitted a bug report to Apple). I've also tried compiling with gcc-4.2, using the same command lines/patches used in MacPorts. The program compiles but does not work. I read somewhere SheepShaver had to be compiled with gcc-4.0, that's why I'm trying to compile it first as its not available anywhere in binary form on Mountain Lion. –  Frizlab Nov 3 '12 at 13:56
    
re binaries click on the binary links to emaculation.com/forum/… –  Mark Nov 3 '12 at 14:12
show 1 more comment

2 Answers 2

up vote 2 down vote accepted

Someone on serverfault answered the same question. So here's the way to compile gcc-4.0 on OS X Mountain Lion (copied from serverfault):

First get the old 4.0 package that was included with XCode 3.1 from Apple's Open Source page

Download the gcc-5493 package and build using:

mkdir darwin
cd darwin
../configure --prefix=/tmp/testplace --enable-languages=objc,c++
make bootstrap
make install
share|improve this answer
add comment

I just compiled the dev version from a git clone and it compiles with gcc 4.7.2

share|improve this answer
1  
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. –  Michiel Nov 5 '12 at 14:36
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  patrix Nov 5 '12 at 15:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.