GCC upgrade

Mark admin at asarian-host.net
Sun Nov 26 01:05:16 PST 2006


> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org 
> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of Helge Rohde
> Sent: vrijdag 24 november 2006 17:59
> To: freebsd-questions at freebsd.org
> Subject: Re: GCC upgrade
> 
> 
> 
> On Friday 24 November 2006 16:40, Mark wrote:
>
> > > -----Original Message-----
> > > From: Kris Kennaway [mailto:kris at obsecurity.org]
> > > Sent: vrijdag 24 november 2006 17:11
> > > To: Mark
> > > Cc: freebsd-questions at freebsd.org
> > > Subject: Re: GCC upgrade
> > >
> > > > I tested the new gcc, btw (compiled MySQL server with
> > > > it, which takes quite a while). Seems to work fine.
> > > > But I'm not enough of a C expert to know precisely how
> > > > to do a safe upgrade of this kind.
> > >
> > > If you're not an expert then just leave it alone.  Replacing
> > > the system compiler might sound like a cool thing to do, but
> > > what will actually happen is that you'll make your FreeBSD
> > > system unbuildable.
> >
> > Guess I hadn't thought about it that way. Good thinking.
> > It's just that 2.95.4 seems so ancient. :)
> >
> > Only reason I wanted to in the first place, is that I've had several
> > ports that wanted a 3.x series gcc (and kept wanting to build one).
> >
> > Thanks,
> 
> You could leave the default in place, define a different gcc 
> for the ports in /etc/make.conf and then just add to the list of
> excludes every time you run into problems while building a port.
> Thats what i do, and so far roughly 80% of the ports seem quite
> content with gcc4.2.

Thanks, Helge!

Yours is a very elegant solution. :) I really like the idea of still being
able to build my system (as Kris pointed out), and yet do the ports with
the new gcc. I also like the idea of being able to exclude certain ports
(like I would do for certain already compiled things, like
php4-extensions, of which newly added extensions will presumable need the
system compiler again).

One question, though:

..if ${.CURDIR:M*/ports/*} && !${.CURDIR:M*/work/*}

Why would you NOT want to use the new gcc when in a /work/ directory?
(where ports builds).

Thanks,

- Mark



More information about the freebsd-questions mailing list