LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 06-06-2008, 04:56 AM   #1
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
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)?

Just wondering.
 
Old 06-06-2008, 05:53 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
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.

Dave
 
Old 06-06-2008, 06:01 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
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...
 
Old 06-06-2008, 06:08 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 06-06-2008 at 06:21 AM.
 
Old 06-06-2008, 06:12 AM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
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.

Dave
 
Old 06-06-2008, 06:23 AM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by jschiwal
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?
 
Old 06-06-2008, 08:34 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,647
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
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.
 
Old 06-06-2008, 09:26 AM   #8
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,463

Rep: Reputation: 299Reputation: 299Reputation: 299
Quote:
Originally Posted by ilikejam View Post
That said, I believe the Intel compiler generally creates the fastest code on Intel chips, but you'll pay for the privilege.

Dave
It seems to be "free" for "personal non-commercial purposes":
http://www.intel.com/cd/software/pro...eng/219771.htm
 
Old 06-06-2008, 07:01 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by pwc101 View Post
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.

Last edited by jschiwal; 06-06-2008 at 07:24 PM.
 
Old 06-07-2008, 08:25 AM   #10
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
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
 
Old 06-07-2008, 10:35 AM   #11
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out if compiled with gcc slackware_newbie Linux - Software 1 12-05-2006 02:33 PM
Small difference when compiled with gcc and g++ drigz Programming 5 06-15-2006 04:09 PM
Executable compiled w/gcc won't run brancheb Programming 5 05-16-2004 01:56 PM
Java compiled with gcc-3.2 CragStar Linux - Software 5 01-15-2003 01:50 PM
Kylix: Use of gcc compiled objects rich_kay Programming 0 06-07-2002 04:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration