Upgrading Included GCC
backyard1454-bsd at yahoo.com
backyard1454-bsd at yahoo.com
Mon Jul 10 16:10:31 UTC 2006
--- Jim Stapleton <stapleton.41 at gmail.com> wrote:
> On 7/10/06, Dan Nelson <dnelson at allantgroup.com>
> wrote:
> > In the last episode (Jul 10), Jacob Jennings said:
> > > Hello, I am on FreeBSD 5.5-STABLE and was
> wondering if there is a way
> > > to replace the system's GCC, shipped with 5.5,
> (GCC 3.4.2) to GCC 4.1
> > > without upgrading the whole source tree to
> another release? Is there
> > > a way to do this that will not include much risk
> of breaking my
> > > system? Thanks.
> >
> > You can install ports/lang/gcc41, which will give
> you "gcc41" and
> > "g++41" executables.
> >
> > --
> > Dan Nelson
> > dnelson at allantgroup.com
> > _______________________________________________
> > freebsd-questions at freebsd.org mailing list
> >
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
> >
>
> If I'm reading the OP's comment right, he may try to
> do what I did the
> first time... I was smart enough to back up the
> overwritten files
> first... which saved me a reinstall.
>
> DO NOT replace teh gcc, g++, etc. base files for the
> GCC compiler with
> the newly compiled files, that will cause a lot of
> compilation issues
> for many core things and does not work properly. I
> don't know why,
> but it doesn't; it seems a lot of things get very
> tied to a particular
> version of the compiler.
>
> -Jim Stapleton
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>
it just sounds like a bad idea to attempt to do this
anyway. The developers of the Release you are running
seem to think GCC 3.4.2 was a stable enough compiler
to run the system and build things correctly. I'm not
the worlds smartest programmer, but if GCC 4.1 was
good enough to build FreeBSD I'm sure it would be part
of the BASE system.
Your best bet would be to install it from ports and
use it with the appropriate environment variables.
Keep in mind if this is anything like Gentoo the GCC
4.x and 3.x libraries ARE NOT compatible. If it works
like Gentoo replacing 3.x with 4.x you WILL BREAK
otherwise functioning software when the standard
libraries change. Again if it works like Gentoo this
is KDE at the very least. This means all the ports
would likeley need to be upgraded.
Of course if your do get GCC 4.1 to properly compile a
FreeBSD World target (lots of hackign here to replace
the Compiler portion of the World target) perhaps the
hacker mailing list would be interested. And if I'm
not mistaken Rel_6.X still uses the 3.X gcc suite. I
would have to check it but I belive it is 3.4.x or
3.5.x...
Latest and greatest isn't always the best thing,
stable and old means consistent binaries. It's your
call, but don't replace the BASE compiler unless you
fully understand the implications, and like hacking
code to make the World target build and the kernel so
you can get benefit from using the newer version of
GCC. I would suspect only marginal gains if any at all
just because I would think it would be part of FreeBSD
if it made the system components correctly.
my two cents
-brian
More information about the freebsd-questions
mailing list