Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu gcc3.2.1 installation in os x nearly there



Hi Ben,

I do a lot of cross-compiling, the easiest way I've found to use different versions of the GNU toolchain is to set the CC and CXX (and optionally CFLAGS, CXXFLAGS, and LDFLAGS) environment variables to point to the particular compiler and settings I want to use. In your case CC would appear to be "/usr/opt/gcc/bin/fsf-gcc", and CXX would be "/usr/opt/gcc/bin/fsf-g++" (or "/usr/opt/gcc/bin/fsf-c++", depending). Any automake-/autoconf- type configure process will pick up on these environment variables and use what you specify. As long as the specs file for your new compiler is in order you won't have any linkage problems.

Another option is to use gcc's "-V <version>" switch, but since you didn't integrate into the "stock" OS X hierarchy with the '--prefix' (and/or the '--program-prefix'/'--program-suffix') configure flag(s) I'm not sure if this would work. Anyone?

HTH.

Cheers,
Scott

On Tuesday, Dec 31, 2002, at 11:36 America/Los_Angeles, Ben Dougall wrote:

hiyer,

not sure if this is the right list. i'm enquiring about gnu gcc compilation/installation in os x.

so i'll just ask the question:

i'm attempting to compile/install gcc 3.2.1 using apple's gcc. i'm using os x 10.2.2.

and i'm nearly there i think. i think the only thing i have to do is the 'search path'. make the terminal aware of the newly installed gcc, to make it callable/accessible.

so this is where i've got to:

i configured using:
../gcc-3.2.1/configure --enable-threads=posix --enable-shared --prefix=/usr/opt/gcc --program-prefix=fsf- --disable-libgcj --enable-version-specific-runtime-libs --enable-languages=c

did make bootstrap.

and then did sudo make install.

i've done:
cd /usr/opt/gcc/bin
then:
./fsf-gcc -v

which gives:
Reading specs from ./../lib/gcc-lib/powerpc-apple-darwin6.2/3.2.1/specs
Configured with: ../gccfolder/configure --enable-threads=posix --enable-shared --prefix=/usr/opt/gcc --program-prefix=fsf- --disable-libgcj --enable-version-specific-runtime-libs --enable-languages=c
Thread model: posix
gcc version 3.2.1

so it looks like it's installed successfully. but i just need to know how to access it. or make the terminal aware of it? not sure.

also a further question:
where actually is this gcc installation?
i mean i guess it's here - ./../lib/gcc-lib/powerpc-apple-darwin6.2/3.2.1/specs
but where is that in the finder? why can't i see it in the finder? very confused with that bit. in fact i've never been able to find apple's gcc, that came with dev tools, in the finder.

any help much appreciated. thanks.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >gnu gcc3.2.1 installation in os x nearly there (From: Ben Dougall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.