News for hackers. Stuff that matters.
Re:Clang/LLVM using the built in assembler builds all of Fre... by apl on Saturday October 30, 2010 @05:55AM (#1850553)
No, we won't. The respective communities have been developing with GCC in mind for years. While clang is fantastic, I doubt that an outright replacement will take place.

But emancipated co-existence would be neat.

Re:Clang/LLVM using the built in assembler builds all of Fre... by JoachimSchipper on Saturday October 30, 2010 @06:03AM (#1850576)
Actually, quite a few BSD people will be happy to have a non-GPL compiler.

AFAIK, your comment is spot on for Linux, though.

Re:Clang/LLVM using the built in assembler builds all of Fre... by _delirium on Saturday October 30, 2010 @07:33AM (#1850677)
For those BSDs that target a wide range of architectures (NetBSD is the canonical example), it'll be a while before they transition completely, since the gcc ports list is still considerably larger than the LLVM one.
Re:Clang/LLVM using the built in assembler builds all of Fre... by JoachimSchipper on Sunday October 31, 2010 @01:26PM (#1853690)
Sure, OpenBSD won't be transitioning anytime soon either - indeed, there are a lot of architectures that aren't supported by LLVM yet, and making sure everything worked with gcc-4.x was enough work...
Re:Clang/LLVM using the built in assembler builds all of Fre... by apl on Saturday October 30, 2010 @08:08AM (#1850707)
Yes, you're absolutely right. It's a blessing for the BSD community.

However, when someone mentions "most/all" free operating systems, then Linux and related ecosystems are one hell of a big elephant in the room.

Re:Clang/LLVM using the built in assembler builds all of Fre... by avar on Saturday October 30, 2010 @09:33AM (#1850815)
Ubuntu is already considering switching. Most people don't develop with "GCC in mind". They just target it, but now that there's another compiler that compiles almost all GCC C out there the cost of switching is very low.
Re:Clang/LLVM using the built in assembler builds all of Fre... by StavrosK on Saturday October 30, 2010 @10:03AM (#1850857)
I'm not too familiar with C, but don't compilers have to adhere to the standard? Is the issue developers who depended on GCC-specific behaviour for things the standard doesn't document?
Re:Clang/LLVM using the built in assembler builds all of Fre... by sp332 on Saturday October 30, 2010 @11:44AM (#1851060)
The standard just means that if you write "standard C", the compiler will work as expected (for some reasonable value of expected). But compilers can add extensions, and GCC has a long list of extensions. The Linux kernel uses these GCC-specific features a lot!

Here's a list of extensions, if you're curious... http://linuxdevcenter.com/pub/a/linux/excerpts/9780596009588...

Re:Clang/LLVM using the built in assembler builds all of Fre... by StavrosK on Saturday October 30, 2010 @02:29PM (#1851470)
I see, thank you. I wasn't aware that these were compiler-specific extensions.
Re:Clang/LLVM using the built in assembler builds all of Fre... by riffraff on Saturday October 30, 2010 @11:34AM (#1851039)
gcc, like other compilers, has it's own documented extensions which are used in many projects (such as the linux kernel, but also many interpreters/vms using direct threading for example).

The clang devs try to support them nonetheless for compatibility, except, for what I understand, a few that are explicitly unsupported by design.

Re:Clang/LLVM using the built in assembler builds all of Fre... by avar on Saturday October 30, 2010 @11:35AM (#1851043)
Compilers are free to implement extensions if they want. A lot of programs depend on GCC extensions, so you'd never be able to compile e.g. a modern Linux distro with just an ANSI C compiler.
Re:Clang/LLVM using the built in assembler builds all of Fre... by obneq on Saturday October 30, 2010 @11:30AM (#1851028)
some things are left undefined by the standard, here compiler implementors can do what they will. Another thing are GNU specific extensions, not only in GCC, leading to GNUisms in many scripts and sources. LLVM supports many GNU extensions.
Re:Clang/LLVM using the built in assembler builds all of Fre... by X-Istence on Saturday October 30, 2010 @06:34PM (#1851954)
From what I have gathered in the past, and what has been said here on Hacker News as well, FreeBSD is looking to replace GCC in the base with clang/LLVM, and that is exactly where this move is going.

As the mailing list message specified clang is going to be the default on i386 and x86_64. GCCisms will eventually go away and the code base will be cleaner and more manageable based upon it.

As states in the FreeBSD status report for this last quarter there are already experimental tests being run on the FreeBSD ports build system whereby clang/LLVM are used to compile all of the ports in an attempt to see how far clang/LLVM can get.

Re:Clang/LLVM using the built in assembler builds all of Fre... by dazzawazza on Saturday October 30, 2010 @07:23AM (#1850668)
The main reason for moving to clang is to remove as much GPL code from *BSD as possible (kernel and system libs).

You are correct regarding many of the 'ports' (packaging system) though as there will no doubt be some GCC idiosyncratic code in many of them.

Re:Clang/LLVM using the built in assembler builds all of Fre... by X-Istence on Saturday October 30, 2010 @06:36PM (#1851959)
On the ports build clusters they are doing experimental runs using -CURRENT with clang/LLVM as the only compiler for the ports tree in an attempt to weed out what would be broken and what will work without changes.

So this is definitely something they are already testing.