Slashdot Log In
Plug-In Architecture On the Way For GCC
Posted by
kdawson
on Tue Jan 27, 2009 05:53 PM
from the extending-it dept.
from the extending-it dept.
VonGuard writes "This year marks the 25th anniversary of the GNU Operating System. A major part of that system has always been the GNU Compiler Collection. This year, some of the earliest bits of GCC also turn 25, and yet some of the collection's most interesting years of growth may still be ahead. The GCC team announced today that the long-standing discussion over how to allow plug-ins to be written for GCC has been settled. The FSF and the GCC team have decided to apply the GPL to plug-ins. That means all that's left is to build a framework for plug-ins; no small task to be sure. But building this framework should make it easier for people to contribute to the GCC project, and some universities are already working on building windows into the compilation process, with the intent of releasing plug-ins."
Related Stories
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
So why do I want plugins in my complier? (Score:4, Interesting)
Re:So why do I want plugins in my complier? (Score:5, Funny)
Spell check.
Parent
How spell check could work in a C compiler (Score:3, Informative)
Re:So why do I want plugins in my complier? (Score:5, Funny)
So you can watch trippy visualizations while you compile.
Parent
Re:So why do I want plugins in my complier? (Score:5, Informative)
Go to the GCC Plugins Wiki [gnu.org] & search for "Potential use cases".
Parent
Nice (Score:5, Interesting)
Mod me as a troll if you must but... People ought to read the link given by the parent. Wow.
Nice. You know, in a very funny way, the FSF and their jiahad against the evils of proprietary software are basically creating their own twisted form of DRM. Witness this brilliant idea:
Nice. The Linux kernel guys did this and look at the result--it is a bitch for hardware guys to write drivers for Linux. I'm sure deliberately altering the API with a script will work really well for the GCC guys! Makes me want to participate. Not! In truth, it makes me feel like I'm some kind of criminal--only guilty until proven innocent.
Sadly, the FSF did some very nice things, but I think they are becoming so extreme they are going to marginalize themselves and fade away. You know what the biggest hurdle for the BSD guys go separate themselve from GPL? The compiler. The compiler really is the last bit of power the FSF holds over the open source world as a whole. Pretty much every other bit of the toolchain has been replaced with a non-GPL lisence except a good compiler.
LLVM seems to be coming along nicely with major players backing it. I'd be pretty nervous if I was the FSF.
Parent
Re:Nice (Score:4, Insightful)
Nice. The Linux kernel guys did this and look at the result--it is a bitch for hardware guys to write drivers for Linux
Bullshit. The result is that it's a bitch for proprietary guys to write binary only drivers for linux.
And you know - why should the GCC & Linux projects make things easy for the proprietary guys? It's not like the proprietary guys go out of their way to make life easier for OSS.
Parent
Re:Nice (Score:5, Insightful)
Because biting the hand that feeds you have never been a good strategy. There's not enough open hardware - free operating systems are still dependent on the goodwill of proprietary vendors to be able to support mainstream hardware with anywhere near the same features and performance as users of proprietary OS take for granted.
Granted, this may well change soon, but until then making it hard for hardware developers to provide good Linux drivers is just making things harder for Linux users who have no interest in being dragged into your religious wars.
Parent
Re:Nice (Score:4, Insightful)
Not the developers; the users of GCC benefit (are "fed") by the availability of plugins, proprietary or no. I assume that most developers of GCC are also users, so this benefits the developers as well.
Also, I would hope that the developers of a popular software package would see fit to act in the best interests of their users, rather than fight stupid religious wars over which of proprietary/open is better. Fact is we'll always have both kinds of code, so we should try to get along with each other rather than fight pointlessly.
Unfortunately many free software advocates are more than happy to fight these wars, because they put ideology above the goal of creating great software, making them no better than the greedy corporations they so despise.
Parent
I thought GCC (Score:5, Funny)
... was a plugin for emacs.
Re:I thought GCC (Score:4, Funny)
... was a plugin for emacs.
Well, duh. Everything is a plugin for emacs.
Parent
Re:I thought GCC (Score:5, Funny)
Parent
Re: (Score:3, Funny)
And Emacs is a plugin for what?
Woah, woah, let's not get into Metaphysics here ;-)
GPL to plugins? (Score:5, Interesting)
Does this mean they want to force all plugins to use the GPL? How is that possible? I was under the impression that the GPL is purely a distribution license. It comes into force when you distribute software licensed under it, and requires you to distribute (or make available) source code and other things.
If I write a plugin and do not distribute it with GCC, what legal basis do they have to force me to GPL it? Nothing I distribute is copyrighted by the FSF, and so how can their distribution license apply to my code? I'm confused.
Re: (Score:3, Informative)
Does this mean they want to force all plugins to use the GPL? How is that possible?
A plugin uses the host application's API. It is, therefore a derived work. In the case of the GPL, derived works must be distributed under compatible licenses.
Some applications allow plugins or modules under incompatible licenses, but in those cases, it is the applications' authors prerogative to grant exceptions for plugins.
Re:GPL to plugins? (Score:5, Informative)
A plugin uses the host application's API. It is, therefore a derived work.
From Sega V. Accolade [eff.org]:
Computer programs pose unique problems for the application of the "idea/expression distinction" that determines the extent of copyright protection. To the extent that there are many possible ways of accomplishing a given task or fulfilling a particular market demand, the programmer's choice of program structure and design may be highly creative and idiosyncratic. However, computer programs are, in essence, utilitarian articles - articles that accomplish tasks. As such, they contain many logical, structural, and visual display elements that are dictated by the function to be performed, by considerations of efficiency, or by external factors such as compatibility requirements and industry demands. Computer Assoc. Int'l, Inc. v. Altai, Inc., 23 U.S.P.Q.2d (BNA) 1241, 1253-56 (2d Cir. 1992) ("CAI"). In some circumstances, even the exact set of commands used by the programmer is deemed functional rather than creative for purposes of copyright. "[W]hen specific instructions, even though previously copyrighted, are the only and essential means of accomplishing a given task, their later use by another will not amount to infringement."
Even if the header file can't be legally copied verbatim, you can write a new header file that's API-compatible and not be infringing. Good thing, too, or the Wine folks would be in some serious trouble.
Parent
Re:GPL to plugins? (Score:5, Interesting)
More precisely, the exception states that if the end compiled product is built with non-GPL compatible plugins, then the end compiled product is subject to the licenses of the linked libraries using the exception. As at least some of those linked libraries are subject to the GPL (being part of GCC) then the end product will be subject to the GPL. If you want to propagate (distribute) the end compiled product, it needs to be a GPL-compatible program, which then means that any libraries linked with it need to be GPL-compatible too, which prevents proprietary libraries linked in. If you do not propagate the end compiled product, then no problem.
So, long story short, if you have a non-GPL plugin, then either (1) the plugin must be GPL-compatible, (2) the plugin can't affect the end compiled product, or (3) the compiled program must be GPL-compatible and not be linked with anything non-GPL-compatible (say, a proprietary plugin). Basically, they want to prevent plugin writers the ability to lock down a GPL program by requiring that it be compiled with the proprietary plugin. I think there is a loophole in (3), so I hope I did not misunderstand it.
Parent
Re: (Score:3, Interesting)
I'm not g
Re: (Score:3, Informative)
Umm.. no. This is exactly why RMS is so against GCC having a plugin framework. IF (and only if) you don't distribute GPL code with the plugin THEN you are free to place your plugin under any license you like.
Reminds me of this incident [gnu.org].
Re:GPL to plugins? (Score:5, Interesting)
Parent
Re:GPL to plugins? (Score:4, Informative)
No it's not Bruce. It's exactly what has been said by legal representatives of the FSF.. http://gcc.gnu.org/wiki/GCC_Plugins [gnu.org]
Parent
Re:GPL to plugins? (Score:5, Informative)
Bruce
Parent
Re:GPL to plugins? (Score:4, Interesting)
Sorry for the multiple replies.
Friend of mine once pointed out that practically the whole "let's GPL the library so any apps that use it have to be GPL too" strategy has been thoroughly dismantled by the BSD community.
Consider libedit. It's a BSD-like licensed replacement for libreadline - RMS's favorite example of "strategic" non-use of the LGPL. It's binary compatible with libreadline. So you can create your app and link it to libedit and happily distribute it under the BSD. To claim that libedit is somehow a derived work of libreadline because it has the same binary interface would be absurd. However, many installation scripts make a symbolic link from /usr/lib/libedit -> /usr/lib/libreadline.
That's the strong case for dynamic linking == derivative work.. plugin frameworks have always been the weak case. If the strong case doesn't stand up anymore, how can the weak case?
Don't get me wrong, I don't want to see proprietary plugins for GCC anymore than I like seeing all the proprietary modules for the Linux kernel. But claiming there is some clear legal principle that makes them a copyright violation is a joke.
Parent
Re: (Score:3, Interesting)
define "bad". RMS thinks proprietary plugins would be bad because he thinks everything proprietary is bad.
But let me give you an example. I once worked at a company called Codeplay in the UK. They made compilers, proprietary compilers, and one of their biggest markets was the Playstation 2. Everyone used GCC to develop on the PS2. Ok, a few people used Metroworks' compiler - whatever. So they were directly competing with GCC. Our C++ support was horrid. Our C support was better, but one of the thing
Re:GPL to plugins? (Score:5, Informative)
from a quick look at the mailing list it appears to me the problem is
1) company produces new hardware
2) company produces proprietary plug-in to produce asm for their hardware platform
3) they do not open their specifications
4) they are able to take advantage of GCC and its front ends while using a closed backend
5) ???
6) profit
I may by wrong as i said this is just a quick read of the javabyte code discussion somebody linked to from here.
Parent
Re:GPL to plugins? (Score:4, Insightful)
And this is bad because...
Because it violates freedoms 0 to 3? The whole reason for GNU's existence?
Parent
Re: (Score:3, Insightful)
According to the GPL, BSD-like-licensed code that is distributed in binary form must be accompanied by the full corresponding source code or an offer to provide the source code valid for 5 years (or whatever). That's what the BSD nerds are complaining about.
There's no case law that even suggests that copying an API can result in a copyright infringement. That's SCO all over again.
Re: (Score:3, Informative)
This is really bad advice. If your plugin is not distributed with the GPL software, it's still a derived work.
Mmm I suspect in the area of plugins at least this opens a serious can of worms. If the GCC team write a decent stable plugin architecture with a well documented API and then someone goes and writes a set of BSD header files from that documentation then the argument that it's a derived work gets a bit strained.
If the FSF continue to push that line then we start to move toward the territory of trying to copyright facts about interfaces which after the SCO fiasco most in the free software community might be
Re:GPL to plugins? (Score:4, Insightful)
Parent
25 years of .... (Score:3, Interesting)
This year marks the 25th anniversary of the GNU Operating System.
No, this year marks the 25th year of work on the GNU OS. There is still no GNU OS as such, and it's pretty obvious there never will be.
I'm not saying that there's nothing to show for all that work. The GNU libraries and many GNU utilities are key components in many projects, not the least of which is Linux. (<Sarcasm> Oh, excuse me, GNU/Linux.</Sarcasm> ) These are real achievements, and so is the introduction of a new collaborative model of joint software development.
But the original goal of GNU, to create a free alternative to Unix, has never been achieved. No big loss, there are other free Unix alternatives and even true Unixes for free. I just wish that GNU and its fanboys would stop and ask themselves why they never achieved their primary goal.
Re:25 years of .... (Score:5, Interesting)
That's because it takes thousands of people to make an OS.
Look at Microsoft and their lines of OSes.. They have what, 50k people on staff at any one time with perhaps 2/3 of them doing programming work? Most of their code is already written from buy-oughts, so they now provide mostly maintenance and scripting. There's maybe 20-50 people doing *interesting* stuff at any one time, it being 10 years away.
Look at OSX now. They have a similar issue, but leveraged theirs away by choosing a FreeBSD-like platform which to design everything on top of. They also reduce features for their core GUI programs to reduce testing and errors. They also focus much more aesthetically, in direct comparison to Linux GUIS and Windows. And their equipment is much higher priced (can buy 2-3 laptops of the same quality of 1 mac laptop), considering they discourage Hackintoshes.
The Linux guys ad to design everything from the ground up, because of the choice in license. It was also a NiH kind of "I can do it better" kind of game, because Linux was new and exciting. But development still requires large resources. Linus happened to be the appropriate coder/manager to herd the cats at the bottom. Then everything else fell into place: some by luck and others by necessity.
FreeBSD: Its THE academic system, and it works well. It's a traditional fork from SYS I which they license it very openly. There's work done on it, but the "cool" work is Linux. The BSD's are perfect for stability, file sharing, and network code. It has a healthy set of adherents and users, but mostly is relegated to core network technologies.
Now, we look at HURD.. It's there, with a Debian/HURD system install possible. It's there's few device drivers, even fewer developers, doesnt work with basic equipment, buggy as hell (because few developers), and there's something that's "Just As Free", and works to boot (Linux). Would the FSF be better off on discontinuing the HURD? Probably, but it's their choice, and we dont know what its possible uses are yet either.. There's always a critical mass which things like these hit that make them explode, and they might be right about making their own kernel.
Parent
Re: (Score:3, Insightful)
Huh? You're saying GNU didn't have enough resources? Then how did Linux ever achieve critical mass? Which certainly doesn't have much more in the way of resources, given that their code bases overlap so much.
The difference between GNU and Linux is not resources. The difference is the people running the show. RMS is on a holy mission; Linus just wants to get the job done.
Re: (Score:3, Insightful)
That's because it takes thousands of people to make an OS.
AST debunked that years ago [cs.vu.nl]. And now that minix is available under a free license there is nothing to stop the FSF calling it the GNU OS.
Re:25 years of .... (Score:5, Insightful)
This year marks the 25th anniversary of the GNU Operating System.
No, this year marks the 25th year of work on the GNU OS. There is still no GNU OS as such, and it's pretty obvious there never will be.
I'm not saying that there's nothing to show for all that work. The GNU libraries and many GNU utilities are key components in many projects, not the least of which is Linux. (<Sarcasm> Oh, excuse me, GNU/Linux.</Sarcasm> ) These are real achievements, and so is the introduction of a new collaborative model of joint software development.
But the original goal of GNU, to create a free alternative to Unix, has never been achieved. No big loss, there are other free Unix alternatives and even true Unixes for free. I just wish that GNU and its fanboys would stop and ask themselves why they never achieved their primary goal.
Having tried to get involved a few years back, I think I know why. While I don't deny the extree skill of some of the gnu programmers, GCC, Emacs and Gnuplot are ample evidence of this, they lack, or seemed to lack then, any form of cohesive organisation.
There was a distinct impression that if you didn't code in C, you weren't good enough, and that little use should be made of widely available, and equally free technology, because it wasn't 'hard core' enough, or so it seemed. There certainly was no logical reason for it. They spent, in my opinion, far too much time trying to write clever code, and not enough time trying to make things easily accessible for prospective new members. Since those new members would probably bring in new ideas and fresh impetus, I'd have thought this was a priority. Attracting some managers would have helped.
Their mailing list for Hurd showed their problem quite well. In spite of there being plenty of solutions available for spam filtering, they used nothing, which took me somewhat by surprise. This meant I ended up having to sift through literally hundreds of viagra and porn emails each week to try and follow something.
I asked someone else about it, and he had a script he ran himself to clear the spam. Very clever, very geeky, but very useless for those who think they shouldn't have to do that themselves to make such a mailing list usable.
I gave up after a couple of months, with a much better idea why we never got Hurd.
Parent
Re: (Score:3, Funny)
NO NO NO! They do NOT need to ask themselves that! If they do, they'll form a committee to go about finding a way of answering the question. After years of deliberating, that committee will decide another committee is better suited, and send them off into the desert for 30 days and nights, to search for their spirit guide.
Upon their long-hair-bearded-and-sandalised return, they shall proclaim that the original committee was mistaken in their decision, and call for a review on the whole process.
Years down th
Arrogance (Score:4, Insightful)
To quote the rationale document:
This is the kind of ideological arrogance that drives me up the wall with the FSF and GPL. There is this over riding presumption that they're right, and further more, anything contrary to their aims is "Bad for society". What childish bullshit.
It's not even as if they soften it by making it a question of belief. They could just as easily say "We believe developing non-free software is not good for society". The absolutism in their position reminds me of religious fundamentalism. Which also bugs the shit out of me.
Re:Arrogance (Score:4, Informative)
Sorry, no. They stated their opinion. Here is a newsflash for you: nothing is absolute. Should everyone prefix their opinions, assumptions and even what they think is a fact, with a disclaimer that it's just their opinion, and not to worry, but there is no free software god that is going to send all Microsoft devs to hell?
Lets see;
"I believe evolution is the best explanation."
"I believe you need 3 AAA batteries."
"I believe my hair is on fire."
I am sorry to have to point this out to you, but it's the FREE SOFTWARE FOUNDATION. I think that anyone capable of understanding the English language would be able to recognize that it is their opinion, politically-correct belief disclaimer or not.
Parent
That means all that's left is to build a framework (Score:4, Funny)
Re:That means all that's left is to build a framew (Score:5, Interesting)
Parent
Re:It's Linux, NOT GNU/Linux!! (Score:5, Funny)
why do people still try to attach GNU/ to Linux? It makes no sense.
Me? I run Gnu/KDE/Xorg/Gnome/vim/perl/rxvt/Fluxbox/Firefox/Java/Linux
Parent
Re:It's Linux, NOT GNU/Linux!! (Score:5, Insightful)
Parent
Re:It's Linux, NOT GNU/Linux!! (Score:5, Funny)
but most of the third-party software which gets installed on top has been touched by the hand of gnu somewhere along the lines
I delight in reminding your that gnus don't have hands, they have hoofs!
Parent
It's GNU/Linux if it's not uClinux (Score:4, Interesting)
but trying to run an open source based box without any of the software that gnu has touched is pretty hard
I for one say "GNU/Linux" to distinguish an operating environment designed for a workstation or server from embedded Linux. It's possible to run a useful box, especially one handling embedded style workloads such as IP packet routing, with very little FSF-owned code. A "uClinux" environment might use uClibc or Newlib instead of glibc, uClibc++ instead of GNU libstdc++, and BusyBox instead of Bash and GNU Coreutils.
Parent
Re:It's Linux, NOT GNU/Linux!! (Score:5, Funny)
nuff said.. why do people still try to attach GNU/ to Linux? It makes no sense.
Oh god. Can't we stick to something non-controversial like GWB's legacy, gun control, abortion or the Middle East? Nothing good will come of this....
Parent
Re: (Score:3, Interesting)
why do people still try to attach GNU/ to Linux?
Ah, the great Gnu/Linux naming controversy [wikipedia.org]. It's a long page for a short issue, but if you really want to kill a tree, try printing the talk page, instead.
You know that there's zealotry involved when the argument for justification of a single sentence is longer than the entire article.
Re:It's Linux, NOT GNU/Linux!! (Score:4, Insightful)
The article claims that GNU has produced an operating system, and that GCC is somehow the cornerstone of that "operating system". I don't think the word means what GNU thinks it means. And Stallman's insistence on calling Linux "GNU/Linux" is part and parcel of that misconception.
Parent
Re: (Score:3, Insightful)
GNU has produced an operating system. It's nowhere near as advanced in functionality as Linux, but it exists, and GCC one of the largest parts of it.
It's true that Stallman is a self-important man who makes himself look arrogant by delineating that GNU tools are part of the operating system but not making the same claim for a whole slew of other important tools.
But however correct the OP's statement, I agree with the reply made to it that the fact it comes apropos of nothing indicates it's a troll.
GNU Operating System (Score:5, Funny)
That depends on your definition of "has produced". GNU certainly is actively developing an operating system, but I would say that an OS project that has managed to go 25 years without a stable kernel release cannot fairly be said to "have produced" an operating system.
Parent
Re:It's Linux, NOT GNU/Linux!! (Score:4, Insightful)
Well, the meaning of the word 'operating system' is subective of course. But the goal of GNU since the start was always to produce a UNIX-like operating system. And the UNIX operating system was always a lot more than just a kernel, it included tools, a shell, a compiler, etc. From the UNIX perspective, the GNU definition of 'operating system' makes perfect sense. Now if you're coming from the microcomputer persective, where an "operating system" was nothing more than the kernel and possibly a shell, you'd obviously be more inclined to simply label the kernel as an operating system. On the other hand, back when DOS was created, it barely would've been considered an operating system by the folks using UNIX and VMS. Indeed, DOS would barely qualify as an operating system today, especially considering what modern BIOSes can do.
Parent
Re:Operating System? (Score:4, Funny)
More precisely:
No, the hurd is the (still incomplete) kernel, GNU is the (still incomplete) Operating System.
Parent