Is there a distro compiled with anything other than gcc?
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a distro compiled with anything other than gcc?
I was wondering last night if anyone uses an alternative to gcc when compiling their binaries? Are there any distros built on such an alternative? Are there any advantages?
I've heard from "them" that gcc tends to produce relatively slow binaries, and this page: http://www.osnews.com/story/5830 seems to show that Sun's C compiler produces faster binaries (roughly 10% faster in the two tests). I know this is on a SPARC system, but would the same be true on an x86/x86-64 system? Are there any alternative C compilers that are free (beer and freedom, or even just beer)?
I don't know of any Linux distros compiled with anything except GCC. I'm sure there's an experimental one out there somewhere, though.
New distros are compiled with GCC 4.x, which creates faster code than GCC 3.x (in most cases), so the page you reference may not be relevant any more. That said, I believe the Intel compiler generally creates the fastest code on Intel chips, but you'll pay for the privilege.
Would there be anything stopping someone buying an Intel licence, and then redistributing the binaries for free? I suppose I should address the Intel Compiler licence to find out...
A company may use the Intel compiler if they are compiling non open source on Linux and don't want to compile against gnu libraries that are covered by GPL V2 rather than the LGPL license.
Compiling binaries for a Linux distro this way wouldn't make much sense because source for the packages are covered by the GPL license. Compiling the source assuming a Pentium or better may close up the difference in speed. Some distro's such as Mandrake do this for their binary packages. An x86_64 distro will of course not have to do this.
I doubt whether the libraries supplied with its compiler would be complete enough to compile everything you would provide with a distro.
Also, don't assume that you can distribute the Intel binaries for free. You will have to check to make certain.
---
Also, since the source of the packages are covered by the GPL, there may be a problem linking them against non-GPL libraries. I'm not certain about this however. There may be some source you run into that may make some assumptions that you would compile the source with a gnu compiler & header files. In the least, you may have to change the options used in running the ./configure script on a lot of packages. The users of the distro will have to reverse your changes to be able to recompile the packages.
---
Even if the current kernel will compile with a propriety compiler, what about the next one.
What happens if there is a subtle compiler error. How can a user of your distro handle that.
Also, you will end up having two sets of libraries. One gpl that the customers and use in their projects, and another that your distro is built with.
I don't see any reason why there should be any restriction on the distribution of the resulting binaries. More problematic would be the code you'd be compiling - I doubt you'd get a clean kernel compile out of the Intel compilers, for example.
A company may use the Intel compiler if they are compiling non open source on Linux and don't want to compile against gnu libraries that are covered by GPL V2 rather than the LGPL license.
So the Intel compiler licence won't allow you to compile GPL v2 code?
Quote:
Originally Posted by ilikejam
I don't see any reason why there should be any restriction on the distribution of the resulting binaries. More problematic would be the code you'd be compiling - I doubt you'd get a clean kernel compile out of the Intel compilers, for example.
Does that mean there are parts of the kernel that are gcc specific?
Yes, you can use other compilers ... and some folks do. It's just that gcc is a damn-good compiler and getting better all the time. A lot of cooperative effort is focused on this all-important tool, simply because it's fairly unprofitable to build general-purpose compilers on a commercial basis.
The GPL (et al...) license-agreements are still legally enforceable no matter what compiler you use. You're legally obliged to comply with copyrights.
So the Intel compiler licence won't allow you to compile GPL v2 code?Does that mean there are parts of the kernel that are gcc specific?
The kernel does use c99 and some features adapted from c++. The intel compiler will add these features as well to be able to compile the kernel, if only as an "acid" test. A more likely reason for using the intel compiler and it's libraries is to compile your own code & libraries, and link against the Intel libraries rather than gnu c++ libraries. Then you can distribute & sell the binaries without being required to release the source. A commercial entity may with to release propriety programs, or maybe there are too many licenses & authors of the code they use that they couldn't open source the program if they wanted to. A common reason is that they aren't proud of the code they have written. Another possibility is that if the code were open, it would be clear that the code was reverse engineered (quazi legal) or maybe even if it is original code, may look similar enough in function to something that might attract the attention of an evil patent troll.
There can be a problem if you mix code or libraries from propriety and gpl'ed code. Even using code or libraries from two open source licenses can cause problems, such as gpl v2 and openssl. Openssl's advertising clause conflicts with the GPL. If you link against gpl libraries (such as many c++ libraries) then the program becomes covered by the GPL which the propriety license won't allow. You will also need to read the license for Qt which is free to use for GPL'ed software but may require a license purchase for commercial software.
As I said, the devil is in the details but try to read those details. I think I understand much of GPL V2 license, but I couldn't make head or tails of the Artistic License. I thought it was close to being a public domain license (from a twit FLOSS podcast) but reading it is seems like a freeware license for binaries only and doesn't allow changing code. About 80% of the license consisted of legalese definitions of terms.
If you were to create your own distro, one of the first things to do is grep all of the source code for "license" and "copyright". There could be some surprises.
I have no plans to undertake recompiling a whole distro using a different compiler! I was just wondering if there would be any performance gain from using a different compiler. Thanks for the info though
No performance gain, and not a "distribution", but NetBSD x86 can be compiled with PCC now. The OpenBSD guys are working on the same thing, although I don't recall off-hand if the base system can be compiled using only PCC yet or not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.