[haiku-development] Re: GCC2 and GCC4 on same System

  • From: "Euan Kirkhope" <euan.kirkhope@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 3 Sep 2007 09:30:36 +0100

On 03/09/07, Ithamar R. Adema <ithamar@xxxxxxx> wrote:
> Hi Brecht,
>
> Brecht Machiels wrote:
> > Hello,
> >
> > This is great news. However, I'm a bit concerned about the fact that
> > you only talk about GCC2 and GCC4. What if the GCC boys decide to
> > change name mangling again in, say 2 years from now? Will you add yet
> > another directory with copies of the libraries? The same applies for
> > other compilers. I have no problem with GCC, but I don't think it's a
> > good idea to limit developers to one compiler.
> It would indeed add another set of libraries, using this technique.
> > Perhaps we can come up with a more general solution to this problem?
> > It might take a larger effort, but it can probably save us a lot of
> > trouble in the future.
> Well, the point being that backwards compatibility is currently assumed
> to be a short-lived thing (e.g. GCC2 support), and as there's plenty to
> do to get to R1, I'm assuming everybody is more worried about getting
> the OS complete enough for that.....
> > I'm anything but an expert on compilers or OS design, but here's my
> > view. I suppose GCC uses a function to mangle C++ names. Is it
> > possible to have Haiku to do a 'translation' of mangled names between
> > compiler naming schemes (is as much information in a GCC2 executable
> > as there is in a GCC4 executable?)? An executable could include an
> > indication of which name mangling scheme is used. The loader can then
> > use this to translate the names.
> If the name mangling was the only problem, this would have been a neat
> idea. However, there's more changes then just the name mangling between
> GCC2/GCC4, which makes things (esp. C++ related) a lot more difficult :(
> > Now I'm sure there are plenty of holes in this reasoning which I'm not
> > aware of. But please do look at the larger picture.
> See the above, IIRC, there were changes in the runtime structures
> related to C++ (exceptions, RTTI, etc) as well, making this all pretty
> complex.
> > PS. I bumped into the following a couple of days ago:
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/binary-formats.html.
> > I thought this might be useful.
> This is a really cool thing in BSD, agreed. We might even consider doing
> something simular in the future (would sure help stuff like ndiswrapper,
> I guess). I'm sure we'd accept patches already, if anybody feels
> inclined to do something similar ;)
>
>
> HTH,
>
> Ithamar.
>
> PS: Please note that this is all IMHO, not any kind of official statement.
>
>
>

I personally think it is a good idea that Haiku doesn't take the
presumption that all applications and other Binaries can be simply
re-built if and when a a new compiler comes out.  In addition to API
stability, ABI stability is just as if not more crucial.  In 5 or 10
years time, an good OS is going to want to be able to run binaries
created now.  It's the only real way to guarantee a decent catalog of
3rd party and commerical apps.

IMHO,

Euan

Other related posts: