gcc 3.1 vs 3.2

strobe

Puny Member
Apparently C++ libs compiled with gcc 3.1 aren't compatible with 3.2 even though the 3.1 API was supposed to be 'stable' (my ass).

How is Apple going to manage their situation? 10.2 is built with 3.1 and the dev tools are also based on 3.1. Either Apple will have to switch soon or they will have to maintain 3.1 which they will have to do alone (everybody else will move to 3.2).

Damn, Apple must be pissed |-\
 

fryke

Moderator
Staff member
Mod
Why? Not all Linux distros will have THEIR OS updated in a day. And Mac OS X 10.3 (a smaller update functionality-wise) will be here by March next year afaik. It's the same for everybody, really. In fact, GCC 3.2 compiled binaries unable to work with 3.1 libs means the adoption of 3.2 will be slow...
 

strobe

Puny Member
Please don't compare this to Linux, good grief!

Also, please don't talk about rumors. 10.3? pffft, go home rumor-monger!

3.2 adoption will be rapid. That's the current build and all other gcc3+ using distributions are already moving. This is more difficult for Apple and 3rd parties. Who else is going to maintain 3.1 other than Apple? Nobody! They would rather move to 3.2 which Apple will have more difficulty doing, which is the WHOLE POINT OF THE POST!

BTW you failed to answer the question, however I don't find that surprising.
 

fryke

Moderator
Staff member
Mod
okay, flame-boy, thank you. who 'else' are you then thinking about? and could you either rephrase your question if i didn't answer it? i thought you were asking about how Apple is going to cope with this situation, and my answer was that they were going to cope with it by releasing updates, both to the developer tools and, of course, Mac OS X. I'm sorry that I've put a date behind 'Mac OS X 10.3', but just seems too logical for me. Now if you can't get a grip on your nerves, you better _not_ ask questions in here... Why're you so angry?
 

ladavacm

Unperson Spotter
because there are no system libraries which use C++ linkage; extern "C" at the beginning of every single header file in /System/Library/Frameworks is a dead giveaway.

Why do you think gcc compiled system libraries were compatible with CodeWarrior C++ compiler? Because they use the same linkage, the only one standardized by the platform ABI, the "C" one.

So, yes, .o files compiled with gcc 3.2 will not mix with .o files compiled with gcc 3.1 (or any other C++ compiler, for that matter), UNLESS all symbols are exported using C linkage; this is the case for all symbols exported by system libraries (or any other libraries which want to be compatible with any other compiler or compiler patchlevel than the one they were compiled with).

In other words, don't worry. As long as you can link system libraries to e.g. C programs (ObjC included), they will work across all compilers.
 

strobe

Puny Member
Does that include drivers?

IOKit uses a C interface for user-space programs, but the drivers are written with C++ interfaces.
 

Krevinek

Evil PPC Tweaker
Drivers have been recompiled for 10.1 and 10.2 already (especially video drivers for 10.1, where a rather noticeable change to the API occurred, but 10.2 doesn't change the video API in the drivers at all, I checked), so what makes you think it will be a big deal to have to recompile a driver for 10.3 or whatever?

Just because everyone in the Linux community wants to move to gcc 3.2 doesn't mean we *HAVE* to. You don't want fryke comparing us to Linux, okay... then why do we have to keep up with Linux distros? Linus himself still recommends that 2.95.x is used to compile the kernel, so it isn't like he *HAS* to keep up with GNU.

Now look at it this way: all system <-> application links are done in C, not C++. Obj-C is something Apple has added into the 3.x branch, and should not have any problem giving 3.2 support to link with Obj-C code compiled with 3.1, so I wouldn't worry. 3.1 will be stable enough for awhile, so I wouldn't get your boxers in a bind over how we are going to be soooooo behind the times using gcc 3.1. :rolleyes:

Additional: It isn't like Apple has to 'upkeep' 3.1 by themselves. 3.1 is done, finished. Small bugfixes aren't a problem, and any big issues have been quashed. It is just fine if Apple actually leaves the compiler alone for a few months. :cool:
 
Top