Re: Versions for development tools included in FreeBSD

From: jpd (read_the_sig_at_do.not.spam.it.invalid)
Date: 06/22/05


Date: 21 Jun 2005 22:54:39 GMT

Begin <1119360654.141017.59420@g49g2000cwa.googlegroups.com>
On 2005-06-21, jfathman@aol.com <jfathman@aol.com> wrote:
> With Linux, installing a newer version of gcc than the version that the
> distribution was built with always caused problems (I recall one
> version of Red Hat that included *two* versions of gcc, one for
> building the kernel and another for building applications).

Rh has ueberhaubt a bad name in that respect. Like shipping the 7 series
with a nonexistent gcc release, custom patched so that if you find
source on the 'net that says ``developed under redhat 7 so it SHOULD
work on other linuxes'' you can be sure that it won't.

> Is this safer with FreeBSD? If I am running the latest or near latest
> FreeBSD 4.x or 5.x version, is it typically safe to install the latest
> version of gcc listed in the FreeBSD ports and packages collection?

Look at it this way: There is one system compiler. It comes with the
system and is used to build the system. You should not change or try
to replace this. It is what you get if you type cc or gcc.

You can install any other compiler, and the ports system will make
it accessible under some other name, like gcc34, gcc40, g++40, etc.
So apart from it not being the default when you type cc, yes, you
can have as many compilers as you like. Just set the CC and CXX
variables in your Makefiles.

> Please excuse what must be a very basic question. My motivation is to
> run the latest gcc and perhaps some boost libraries under FreeBSD so I
> can do some C++ development, and this compels me to user newer gcc than
> the gcc version that comes stock with the FreeBSD base system. My goal
> is: FreeBSD, latest gcc/boost, without corrupting the FreeBSD base
> system.

You can. Many do. I do, too: I think I mentioned earlier in this froup
that I normally compile my code regularly with at least two different
compilers, currently g++295 and g++34, simply to detect and remove
compiler specific dependencies. Not the newest, but there's enough
features in the language that both support to keep me occupied for a
while. :-)

-- 
  j p d (at) d s b (dot) t u d e l f t (dot) n l .


Relevant Pages

  • Re: Compiling FreeBSD with GCC 4.3+
    ... m= 1) that compares PC-BSD to Kubuntu. ... Kubuntu uses GCC 4.3.3 compared ... Pity it doesn't provide an unbiased comparison of FreeBSD ... compiler in FreeBSD. ...
    (freebsd-questions)
  • Re: Whats the story with the "end of XP"?
    ... Support gives them access to the larger body ... The same compiler suite may be "best" in both ... In the case of ByteCraft compilers, you are truly expert in your field, you work closely and rapidly with customers if there are any issues, and you have top class testing and quality control. ... understanding the inner workings of a relatively simple compiler like GCC ...
    (comp.arch.embedded)
  • Re: about the gcc 3.4.x problems
    ... >>ports tree back in April. ... There was a reason why gcc34 port was kept free of local FreeBSD hacks. ... GCC tarballs as distibuted by FSF and base system version of the compiler ...
    (freebsd-current)
  • [RFC][PATCH-2.6] Clean up and merge compiler-*.h
    ... the kernel headers in include/linux to include/linux-abi. ... * Common definitions for all gcc versions go here. ... -/* Some compiler specific definitions are overwritten here ...
    (Linux-Kernel)
  • Re: LPC900/80C51 Compiler Toolchain
    ... >> supported by GCC, and so they invest. ... > if they already have their in-house compiler. ... one of the main companies in the Symbian consortium ... vendor to provide a good compiler for Atmel AVRs and eventually became ...
    (comp.arch.embedded)