gcc_select for gcc42
paul beard
paulbeard at gmail.com
Wed Jul 4 09:42:54 PDT 2007
On 7/4/07, paul beard <paulbeard at gmail.com> wrote:
>
>
>
> On 7/4/07, Sylvain <sylgar at ifrance.com> wrote:
> >
> > Hello,
> >
> > How do I set the freshly installed gcc42 as the default compiler on my
> > system? Or at least make new ports compile with gcc42.
>
>
>
> I assume you can edit the gcc_select command, since it's a shell script: I
> wondered about the same thing myself.
>
>
> [/Users/paul]:: file `which gcc_select`
> /usr/sbin/gcc_select: Bourne shell script text executable
>
>
Having said that (and looked at the script's guts), it doesn't look trivial
to do ;-)
However, running gcc_select with the -n flag gives you all the steps and you
could build your own gcc selector/switcher, instead of hacking on the system
script.
[/Users/paul]:: /usr/sbin/gcc_select -n 3.3
Commands that would be executed if "-n" were not specified:
mkdir -p /usr/bin
rm -f /usr/bin/cc /usr/bin/c++
rm -f /usr/bin/cc.real
rm -f /usr/bin/c++.real
rm -f /usr/bin/gcc.real
rm -f /usr/bin/g++.real
rm -f /usr/bin/gcov.real
ln -sf gcc-3.3 /usr/bin/cc
ln -sf g++-3.3 /usr/bin/c++
rm -f /usr/bin/gcc
ln -sf gcc-3.3 /usr/bin/gcc
rm -f /usr/bin/g++
ln -sf g++-3.3 /usr/bin/g++
rm -f /usr/bin/gcov
ln -sf gcov-3.3 /usr/bin/gcov
mkdir -p /usr/include/gcc/darwin
rm -f /usr/include/gcc/darwin/default
ln -sf 3.3 /usr/include/gcc/darwin/default
mkdir -p /usr/libexec/gcc/darwin/i386
rm -f /usr/libexec/gcc/darwin/i386/default
ln -sf 3.3 /usr/libexec/gcc/darwin/i386/default
mkdir -p /usr/libexec/gcc/darwin/ppc
rm -f /usr/libexec/gcc/darwin/ppc/default
ln -sf 3.3 /usr/libexec/gcc/darwin/ppc/default
mkdir -p /usr/lib/gcc/darwin
rm -f /usr/lib/gcc/darwin/default
ln -sf 3.3 /usr/lib/gcc/darwin/default
mkdir -p /usr/lib
rm -f /usr/lib/libcc_dynamic.a
rm -f /usr/lib/libcc_kext.a
rm -f /usr/lib/libgcc.a
rm -f /usr/lib/libcc.a
rm -f /usr/lib/libstdc++.a
mkdir -p /usr/local/lib
rm -f /usr/local/lib/libcc_noc++.a
ln -sf gcc/darwin/default/libgcc.a /usr/lib/libcc_dynamic.a
mkdir -p /usr/include
rm -f /usr/include/stdint.h
ln -sf gcc/darwin/default/stdint.h /usr/include/stdint.h
mkdir -p /usr/share/man/man1
rm -f /usr/share/man/man1/c++.1
ln -sf c++-3.3.1 /usr/share/man/man1/c++.1
rm -f /usr/share/man/man1/g++.1
ln -sf g++-3.3.1 /usr/share/man/man1/g++.1
rm -f /usr/share/man/man1/gcc.1
ln -sf gcc-3.3.1 /usr/share/man/man1/gcc.1
rm -f /usr/share/man/man1/gcov.1
ln -sf gcov-3.3.1 /usr/share/man/man1/gcov.1
rm -f /usr/share/man/man1/cpp.1
ln -sf cpp-3.3.1 /usr/share/man/man1/cpp.1
rm -rf /usr/share/man/man1/cc.1
ln -sf gcc.1 /usr/share/man/man1/cc.1
--
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at mac.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20070704/04f7c8d3/attachment.html
More information about the macports-users
mailing list