[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Gcc 3.3.6 v 4.0.1



Vincent Rivière wrote:
Miro Kropacek wrote:
> With RPMs you will need to play with upgrade vs side-by-side
> settings and similar crap.

Not necessarily.
It is possible to build an alternative GCC package using alternative executable names.

For example, on Cygwin and Redhat, "gcc" is the standard compiler for the system, currently 3.x. Another command "gcc4" is provided for new compiler features, and a tool for the developers for making the source packages fully compatible with it. I guess that when all the source packages are be fixed, "gcc4" will be renamed "gcc", and it will become the official compiler for the system.

This would probably be the best thing to do for SpareMiNT, too.
Mark, you should try this for your upcoming GCC 4.x RPM ;-)

I already do do (hehe) this. Under my /usr/local/ I have gcc 3.3.6 and gcc 4.0.1 installed. The binaries are all *-3.3.6 or *-4.0.1 and the main executables are symlinks to the intended binary. Then when I build an RPM I can just export PATH=/usr/local/bin:$PATH before building and I get the compiler of my choosing. I'm sure the gcc-config script from gentoo is a bit more clever but that's really all there is to it. GCC doesn't intrude on itself from other versions as long as the binaries are renamed everything under lib and libexec are fine (I think). I know in this instance 3.3.6 uses lib/gcc-lib and 4.0.1 uses libexec so they definitely don't bother each other.

PS: I haven't been working on it much the last couple days due to being swamped at work. I'll get back on it when I can. I'm stuck on gmp right now. We can get past it by disabling gmp's use of obstack_vprintf and c++ support which more than likely are NOT being used by gcc (which is the only reason we're building gmp in the first place) but the fact that those things DON'T work may not be good. I'm hoping they will build and test fine in gcc 4.3.x once we get that created.

Thanks,
Mark