IBM Releases XL compilers for Mac OS X 84
Visigothe writes "IBM released their XL Fortran Compiler and XL C/C++ Compiler for OS X. The compiler is binary compatible with GCC 3.3, and has multiple levels of optimization, creating binaries that are much faster than their GCC-compiled counterparts." No prices are noted, and the planned availability date is January 16.
Benchmarks (Score:5, Interesting)
That would be interesting to see.
Re:Benchmarks (Score:4, Informative)
Re:Benchmarks (Score:2, Informative)
Re:Benchmarks (Score:5, Informative)
Re:Benchmarks (Score:1)
Re:Benchmarks (Score:1)
To make a link, enter it as something like:
<a href="http://slashdot.org/">Slashdot</a>
which appears as:
Slashdot [slashdot.org]
Note that in the href, the URL in quotes needs the http:// bit.
Supports Objective-C! (Score:5, Insightful)
This means that this could well be usable as a replacement for GCC in developing Cocoa-based apps. It's good to finally have some options. Can't wait to see how well it works!
Supports G4 and G5, but not G3 (Score:4, Interesting)
As a very happy G3 user I will be sad when I'm forced to upgrade.
Re:Supports G4 and G5, but not G3 (Score:1)
Re:Supports G4 and G5, but not G3 (Score:2, Informative)
Re:Supports G4 and G5, but not G3 (Score:3, Insightful)
The original "Fat Binaries" on the Mac were for 68k/PPC version, however, the idea of the FAT binary is not limited by CPU architecture.
You could easily produce a "Fat Binary" that runs on G3/G4-G5/Alpha/68K/SPARC. That said, it would be one big binary before you stripped it =)
Re:Supports G4 and G5, but not G3 (Score:3, Informative)
NeXT did "Fat Binaries" before Apple did, and they are still possible in OS X's .app bundles. NeXT's added Fat Binary support on Black Tuesday [simson.net] in 1993. Apple's Fat binaries were introduced with the Power Macintosh line in 1994. NeXT's
fat binaries could be built to run 68K, x86, SPARC,
and PA-RISC.
Of course, right now the search algorithm isn't designed for a fallback mechanism. The system can consider itself either a "MacOS" or a "MacOSClassic". Both are assumed to be generic PPC code and one doesn't fal
Re:Supports G4 and G5, but not G3 (Score:2)
That's not the "fat" part about the fat binaries. Fat binaries are for several architectures in one file.
You build and link your binary like normal, then use lipo to merge them.
Darwin 7 is build completely fat, with even the kernel being a fat binary.
Here's the output of lipo -detailed-info on "yes":
Don't forget x86! (Score:3, Interesting)
One Application Icon to Rule Them All.
Re:Don't forget x86! (Score:1)
Re:Don't forget x86! (Score:2)
Re:Supports G4 and G5, but not G3 (Score:2)
These compilers will produce better code then GCC for the PPC chips in macs, so maybe next year we will have a OS compiled on XLC and not GCC (another speed-up). But I don't know how reliant Apple is on GCC for compiling (extensions and whatnot).
Re:Supports G4 and G5, but not G3 (Score:2, Insightful)
It was rumored a while back that Apple might use IBM G3+Altivec chips in PowerBooks, further confusing the issue.
Re:Supports G4 and G5, but not G3 (Score:2)
Re:Supports G4 and G5, but not G3 (Score:3, Informative)
the original G4 is a G3 + Altivec + MERSI + the 604e's FPU hardware
the modern G4's bear very little resembalance to the 7400 however, having a pipeline three stages longer and a more elaborate altivec implementation.
Re: (Score:1)
It will not RUN! on a G3 but code is ok for G3 (Score:2)
Pricing (Score:5, Informative)
Linkage [arstechnica.com]
Re:Pricing (Score:2)
Current compiler? (Score:2, Insightful)
Re:Current compiler? (Score:5, Informative)
I'm not 100% sure but I seem to remember in the WWDC keynote Jobs saying it was built with gcc3.3 the version that ships with Xcode.
Ya probably. I was surprised that they implemented Vector support so quickly. XLC really shines on Floating Point code, but I'm really curious to see how well it handles Vector. Even if the whole operating system isn't compiled with xlc as long as the core libs and things like codecs for QT and other multimedia apps the speed up would be impressive.
Re:Current compiler? (Score:4, Informative)
More likely they will break it down into chip specific libs and kibbles and bits and have the installer detect and choose. If they code for the middle ground I fear they will give up the best chance of having huge speed gains. They need those gains on the G5 to keep their momentum going.
Re:Current compiler? (Score:2)
Re:Current compiler? (Score:2)
If you chose for "your machine", you could not move the system folder to another machine and have it boot if the other machine were substantially different.
Granted it was a bit of a mess, but it did provide for a very lean system folder, and increased performance.
Re:Current compiler? (Score:4, Informative)
Of course, this could have been gotten around by using Bundles, which is a folder that acts like a double-clickable application. The structure is:
SomeApplication.app/ <-- The application
Contents/MacOS/SomeApplication <-- The OSX binary
Contents/MacOSClassic/SomeApplication <-- The OS9 binary
Contents/Resources/Blah.jpg
Contents/Resources/Foo.tiff
It chould be:
SomeApplication.app/
Contents/MacOS/SomeApplication <-- The generic binary
Contents/MacOS-G3/SomeApplication <-- The G3-optimized binary
Contents/MacOS-G4/SomeApplication <-- The G4-optimized binary
Contents/MacOS-G5/SomeApplication <-- The G5-optimized binary
Contents/Resources/Blah.jpg
Contents/Resources/Foo.tiff
When you double-click, it uses whatever binary is appropriate for the system. Unfortunately, this doesn't work for Frameworks, which lack the notion of platform.
A rant to beat the lameness filter: this bundle format should be adopted everywhere. It allows for a folder to be used as an application, and to contain all the resources it needs to be used and run. Moving the folder moves the application, and the folder doesn't use any vodoo to keep the data together, as pretty much any HD format understands folders and files.
In addition, the multiple-binaries trick (as shown above working with OS9/X and proposed for processors) would allow the same bundle to work on muluple platforms, so I could email you a zipped version of Office from my Mac that could work on your Wintel, no Java required.
The support is in the Finder/Explorer/Browser, which needs to understand that 'double click on bundle' == 'find correct binary and launch it'.
Re:Current compiler? (Score:3, Informative)
Ahh, but that is what fat binaries [apple.com] are for. A fat binary allows you to package up several different versions of a program optimized for different runtime architectures.
Macintoshes have been able to use fat binaries f
Re:Current compiler? (Score:2)
Whups, somehow my link was lost. Here is the link [apple.com] to optimizing the G5. And yes, I know it should be PowerPC not PowerPc!
Re:Current compiler? (Score:1)
Fat binary was a ugly quick&dirty hack that ruined the beautiful, clean design of resource forks. A better way would have been to use for example "PPCD" resources for PPC machine code and "CODE" for existing 68k binary code.
The NeXT approach of MacOSX is however much more scalable. It works really well in OpenStep bundles.
Setting up a karma whore... (Score:2, Interesting)
What do they mean when they say that two compilers are "binary compatible" Does it mean that XL produces identical machine code? Does it take identical switches so makefiles don't have to be rewritten? Does it simply mean that XL has the same foibles as gcc, so code written to gcc's foibles doesn't need tinkering? Use of the term doesn't quite fit with my current understanding of compilers.
-Troy
Re:Setting up a karma whore... (Score:1, Informative)
Re:Setting up a karma whore... (Score:4, Informative)
Think of it like nuts and bolts -- a nut and bolt are compatible if they have the same diameter and threads per inch, but they may be made of carbon steel, steel, bronze, nylon, titanium, whatever.
Comment removed (Score:4, Informative)
Re:Setting up a karma whore... (Score:1)
The extreme case would be that Apple could compile OS X with XLC ($) but still allow people to run applications written with gcc (free).
Re:Setting up a karma whore... (Score:2, Informative)
Re:Setting up a karma whore... (Score:5, Informative)
As for commandline switches and such, I would assume that they would be the same (or that there would be a simple option like --gcc that would turn on "gcc mode" so that it took the same command line stuff).
PS: If I'm wrong would someone please reply and correct me, and not just mod me wrong?
Re:Setting up a karma whore... (Score:4, Informative)
What it REALLY means:
1) You can compile the majority of your application in GCC, and selectively compile in IBM's XLC.
2) You can compile one library in XLC, and link it in to your GCC application.
3) You can compile a library in GCC, and link it in to your XLC application.
Etc. You get the point. Essentially, while the code they generate is very, very different in terms of optimization and performance, they are, in fact, completely interchangeable in terms of the things they produce as output.
XLC is, in fact, a very different beast than GCC. The number of optimizations it provides goes well beyond what GCC currently provides, and does include auto-vectorization and support for OpenMP - things which don't suck on parallel systems.
So XLC is a good thing for commercial software developers, and at minimum, the compatibility of the systems means that we as developers have no excuse not to be compiling, at bare minimum, the most *important* functions (and if we're doing it this way, it might as well be specific functions) in XLC, and link in that parallelized and optimized object file into our existing project.
As for commandline switches... nope. Almost never compatible. No hope. Basic stuff is mildly similar, but the guts you'd use once optimizing are very different.
But at a high level, yes, you just say xlc -O3 instead of gcc -O3, only you might say xlc -O5.
Re:Setting up a karma whore... (Score:2)
FASTER OS X? (Score:5, Interesting)
Re:FASTER OS X? (Score:2)
Just like I'd assume that Microsoft would use Intel's compilers if a) Microsoft didn't make compilers and b) AMD (and other clones) weren't around.
So I'm just speculating. Anyone know the real answer?
Re:FASTER OS X? (Score:4, Interesting)
Porting an operating system to a different compiler is a pain in the neck, and most OS's use compiler-specific tricks to deal with low-level details. Also, most of Apple's higher-level software is in Objective C, and as of now only GCC really supports Obj C well on the mac.
Re:FASTER OS X? (Score:2)
Re:FASTER OS X? (Score:4, Funny)
Re:FASTER OS X? (Score:4, Interesting)
Re:FASTER OS X? (Score:5, Interesting)
The exception is Quicktime, which uses (and has used since well before OS X) a older, custom version of the IBM compilers. I believe, but am not 100% sure, that Quicktime has always used the IBM compilers on PowerPC CPUs.
This is very good news for Apple's science users, one of the real problems pushing Mac boxes into some markets has been the lack of a really good Fortran compiler. The performance boost for C/C++ code will also be appreciated.
As for a wholesale transition of OS X to the IBM compilers: next to no chance. QA of the transition would take far too long and absorb resources that could be better used on other improvements. It would also cause problems with the Open Source versions of Darwin, so expect the vast majority of OS X to remain GCC compiled.
That being said, I would expect that certain chunks will be transitioned, where it makes sense. The output of the IBM compilers is binary compatible with GCC, so you can recompile (and re-QA) chunks of the OS where you'll get a major improvment.
Quartz Extreme, CoreFoundation and AppKit spring to mind, but don't expect this to happen in 10.3 or 10.4, more like 10.5 or 11.0.
Re:FASTER OS X? (Score:3, Informative)
OpenMP, at app-level, is pretty much guaranteed to get some use, and Apple will very likely spend some time in the vec/math libs fully OpenMPing that code to get parallel use of both CPUs.
CoreGraphics would probably ge
Re:FASTER OS X? (Score:3, Interesting)
I expect that once IBM completes the ObjC compiler that most of the OS will be migrated to that compiler, as will much of the high performance commercial software out there. The developer tools will still come with the free GCC compiler, and Apple will still maintain it, but without changes to the core of GCC (which are being resisted by the maintainers), it will ne
Re:FASTER OS X? (Score:1)
Re:FASTER OS X? (Score:3, Informative)
The reason (again from what I've read) that the gcc maintainers are resisting the changes that Apple would really like to make for the G5, is that the changes would fundamentally break many if not most of the other platforms com
Re:FASTER OS X? (Score:1)
Autovectorisation ? (Score:5, Interesting)
Re:Autovectorisation ? (Score:2)
Maybe, maybe not.
Integer ops are also subject to this.
Fortran Motives (Score:4, Interesting)
So why are you still able to buy Fortran compilers? Because the people who use the language tend to be engineers (the physical kind) and scientists, and thus spend a lot of money on high-end computers. No Fortran compiler, not fat contracts for your Starfire [sun.com] and Origin [sgi.com] boxes. Which is why Sun and SGI both sell Fortran. And whose the leading vendor of Fortran for the Itanium? Good guess [google.com].
So is IBM trying to help Apple sell more Macs? Probably not. They'd make a little money from the extra CPU sales, but not enough to justify something like this. More likely they have this compiler to help them sell more high-performance PPC systems [ibm.com]. As long as they have it, not that much extra effort to port it to the Mac.
Re:Fortran Motives (Score:3, Interesting)
As an aside, has anyone else noticed the lack of Fortran texts in brick & motor bookstores? I know Numerical Recepies in Fortran [nr.com] is online, anyone care to mention a good intro. text for a "n00b" like me?
Re:Fortran Motives (Score:3, Interesting)
Re:Fortran Motives (Score:1)
Its a well written book that assumes the reader knows nothing of fortran. He teaches Fortran at RPI [rpi.edu].
Re: (Score:1)
Re:Fortran Motives (Score:2)
Re:Fortran Motives (Score:1, Interesting)
objective-c support (Score:2, Interesting)
Re:objective-c support (Score:1)
0 is more than 500 (Score:2)
Re:0 is more than 500 (Score:2, Informative)
How does this effect the built in GCC (Score:1)
Also available for Linux PPC32/64! (Score:1, Informative)