Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
If clang/LLVM was finished, would you support Gentoo's move?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

Would you support a Gentoo move to clang/LLVM
Yes
79%
 79%  [ 155 ]
No
20%
 20%  [ 40 ]
Total Votes : 195

Author Message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Sun Apr 18, 2010 3:49 pm    Post subject: Reply with quote

Yep, that are good news. Now we should try if we can compile a working kernel with clang. :)
Back to top
View user's profile Send private message
Bill Cosby
Guru
Guru


Joined: 22 Jan 2005
Posts: 430
Location: Aachen, Germany

PostPosted: Sun Apr 18, 2010 5:12 pm    Post subject: Reply with quote

Is the C support good in clang? Their aim of gcc compatibility scares me a little, in general this is rarely a good idea.
_________________
The Creature from Jekyll Island.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Sun Apr 18, 2010 5:28 pm    Post subject: Reply with quote

Haven't tested it, yet, but I'll guess/hope it's similar to ICC, which has a compatibility-mode which is optional.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Tue Apr 20, 2010 3:29 pm    Post subject: Reply with quote

Just wanted to let the interested know, that I just set up a bugtracker with seperate trackers for ICC & clang/LLVM and I'll start later to add some things (broken packages) to it. Everybody's welcome to file bugs and more importantly, fix them. Thanks.

http://phorcix.org/bugs/
Back to top
View user's profile Send private message
luismw
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jan 2010
Posts: 85

PostPosted: Wed Apr 21, 2010 9:02 am    Post subject: Reply with quote

Phoronix has just published a benchmark of gcc against llvm & clang, including both compile time performance and compiled programs performance. The results are here: http://www.phoronix.com/scan.php?page=article&item=gcc_llvm_clang&num=1.

As usual with Phoronix's benchmarks, there isn's a definite conclusion. The bottom line is that llvm is sometimes better and sometimes worse, for the particular cases they have chosen.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Wed Apr 21, 2010 9:53 am    Post subject: Reply with quote

Bill Cosby wrote:
Is the C support good in clang? Their aim of gcc compatibility scares me a little, in general this is rarely a good idea.


The C support in clang is considered to be production ready. The C++ support in clang is not considered to be at the same level.

LLVM was not able to stand on its own before, so GCC's front-end was used to enable it to compile software. I think the goal of GCC compatibility is to make Clang a drop-in replacement for GCC's front end.
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Thu Apr 22, 2010 4:13 pm    Post subject: Reply with quote

*subscribing to thread*
@avx:
I'm really interested in all of this stuff. It's some months I feel like getting my hands dirty with GCC and glibc code, but finding the time as of now is really difficult. I'm not that experienced as a programmer and I'd have to learn a lot for/from this. I was headed to some code refactoring in the compiler frontend area which should be the first step for getting a "featurefull" compiler, much like the KMS did for drm. The main problem putting me off of this is the lack of time, I have to study a lot :) Not to mention that it would be a significant change to carry alone and I can't be a full-time coder.
About resources: I own a server on OVH, if it can be of any use. As of now, the home partition is just 17% full, meaning there are 151Gb still available.
I can setup users, apache servers and whatever is needed. If you need a new domain, buying it costs just 7€ per year (which I can pay without problems). Of course, I can allow ssh and ftp access. The server runs Gentoo, you'll feel at home :D It also has an rtorrent instance running 24/24 7/7, I'm downloading the torrent right now. If you can manage to upload it fully, you could get easier redistribution (100Mbit symmetric line). If you need a place to share ideas, I'm also hosting a free non-profit IRC network (frozenwolf) where I'm registered as a server owner. It's mainly an italian network but that's not a problem. I'm a newbie about IRC but my friends can overcome my shortcomings.
Feel free to ask :)

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Thu Apr 22, 2010 5:34 pm    Post subject: Reply with quote

Hello @Neo2, let me first thank you for your interest :)

I'm also by far not the best coder, nor do I've got unlimited time, so any help is very welcome.

I found that the VM you're currently leeching imho ain't that good, since it's pretty much outdated - seems the LinuxDNA-devs haven't updated it in a while. I'm in the process of creating a more up2date VM currently, which I'm willing to share, but that might take another day till it's finished. I'll be glad, if it works for you and you'd like to share it from your server, as you can see, my upload-speed from home isn't that nice :/

Regarding collaboration, I'm no webdev-pro, so if you'd like to setup something more usefull than I did (i.e. nicely integrate a wiki,forum,bugtracker,...), don't hesitate and go ahead. IRC is fine for me and me living in Germany, we shouldn't have much timezone-trouble. Concerning a domain, well I'm pretty much clueless about names, but if you think it's worth it, I won't stop you :)

I don't have much time today, if you want, just drop me a pm or add me via jabber, give me some details about IRC or what information you need/want, and I'll see when I can make some free time.

cheers,avx

Edit, if you're bored, you can already have a look at the packages which need fixing and dig deep ;)
Back to top
View user's profile Send private message
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 932
Location: Fort Collins, CO

PostPosted: Thu Apr 22, 2010 5:41 pm    Post subject: Reply with quote

Ya I would support it! :)
_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1554
Location: Just over the horizon

PostPosted: Thu Apr 22, 2010 9:57 pm    Post subject: Reply with quote

luismw wrote:
Phoronix has just published a benchmark of gcc against llvm & clang, including both compile time performance and compiled programs performance. The results are here: http://www.phoronix.com/scan.php?page=article&item=gcc_llvm_clang&num=1.

As usual with Phoronix's benchmarks, there isn's a definite conclusion. The bottom line is that llvm is sometimes better and sometimes worse, for the particular cases they have chosen.


Saw that. It's pretty clear, looking at the benchmarks, that llvm/clang generates slower binaries at this point in time. Somebody mentioned it earlier in this thread as well. But, these are early days yet and I would expect it to catch up with gcc in the not too distant future.
Back to top
View user's profile Send private message
ssvb
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2003
Posts: 96

PostPosted: Tue Apr 27, 2010 12:36 pm    Post subject: Reply with quote

LLVM 2.7 is released. I wonder how long will it take to reach portage? :)
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Apr 27, 2010 12:54 pm    Post subject: Reply with quote

ssvb wrote:
LLVM 2.7 is released. I wonder how long will it take to reach portage? :)


That is what I was thinking.
Back to top
View user's profile Send private message
Bobbycar
n00b
n00b


Joined: 25 Feb 2009
Posts: 8

PostPosted: Tue Apr 27, 2010 1:29 pm    Post subject: Reply with quote

Well, they're quite fast... ;)

http://packages.gentoo.org/package/sys-devel/llvm
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Apr 27, 2010 1:58 pm    Post subject: Reply with quote

Neat. Now we just need to wait for this to propagate through the mirrors.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Apr 27, 2010 2:04 pm    Post subject: Reply with quote

I just did eix-sync and it seems that the updates to llvm and clang have already propagated to me. :D
Back to top
View user's profile Send private message
MalleRIM
Guru
Guru


Joined: 23 Jul 2007
Posts: 540
Location: Germany

PostPosted: Tue Apr 27, 2010 5:27 pm    Post subject: Reply with quote

I've tried to compile my whole system with llvm-gcc (clang is not accepted by most packages due to compiler version, no idea how to fix that) and it actually does work apart from some packages. about 20 of about 1000 packages did not compile (amongst which were glibc, glib and kdelibs), and a few had segfaults during execution, krita did not even start up when koffice-libs where compiled with llvm. Apart from that I can tell that most packages where compiling faster, some up to twice as fast (but some even slowlier) and most of the system ran stable. I didn't perceive any performance improvements during runtime but I did not have a direct comparison either.

I'd like to see llvm as a supported option in gentoo, but gcc has to remain supported, too as it supports more languages and architechtures. Unfortunately this would double some work such as stablilization. It might even require extra keywords (e.g. amd64-gcc and amd64-llvm). I don't know enough about this to decide whether or not this is a good idea.[/glep]
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Apr 27, 2010 11:47 pm    Post subject: Reply with quote

MalleRIM wrote:
I've tried to compile my whole system with llvm-gcc (clang is not accepted by most packages due to compiler version, no idea how to fix that) and it actually does work apart from some packages. about 20 of about 1000 packages did not compile (amongst which were glibc, glib and kdelibs), and a few had segfaults during execution, krita did not even start up when koffice-libs where compiled with llvm. Apart from that I can tell that most packages where compiling faster, some up to twice as fast (but some even slowlier) and most of the system ran stable. I didn't perceive any performance improvements during runtime but I did not have a direct comparison either.

I'd like to see llvm as a supported option in gentoo, but gcc has to remain supported, too as it supports more languages and architechtures. Unfortunately this would double some work such as stablilization. It might even require extra keywords (e.g. amd64-gcc and amd64-llvm). I don't know enough about this to decide whether or not this is a good idea.[/glep]


As LLVM/Clang mature, they should reach parity with GCC in terms of software support. At that point, anything that does not compile on them should be invalid code in the first place. Having extra keywords flags should be unnecessary because anything that compiles on one but not another because the code is written around some quirky compiler behavior probably should be masked.
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Wed Apr 28, 2010 4:45 pm    Post subject: Reply with quote

Hi guys,
avx has made up a new VM and has released the torrent.
It has been fully uploaded to my server, you can download it from this torrent.

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt


Last edited by Neo2 on Sat May 01, 2010 7:18 am; edited 2 times in total
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Thu Apr 29, 2010 1:31 pm    Post subject: Reply with quote

Ok, new VM is up:
readme wrote:
this archive contains a virtual machine running Gentoo Linux (amd64). it's purpose is to
work as a playground for toying with Intel's ICC, finding and posting related bugs.

additionally to a basic Gentoo (@system), the following packages have been installed:
- eix
- gentoolkit
- dhcpcd
- reiserfsprogs
- icc
- llvm
- clang
- dietlibc
- uclibc

as of today, every packages is up2date as in Gentoo's portage (~amd64), except the icc,
which is of version 11.1.069, which isn't in portage, yet.

before you start, there are some things you should know:
- the password for root is <foobar>, without the <>
- the vm is setup to boot in 1280x1024@32
- you need to expand the virtual-disk to have enough free space to work. to do that
check out `vmware-vdiskmanager -x` or use the utils-menu in the vm's settings
- you may need to change the CPU-count and RAMsize of the vm
- icc is installed, but for it to work, you need to place a license-file in /opt/intel/licenses/
a free license for non-commercial use can be requested at
http://www.intel.com/cd/software/products/asmo-na/eng/download/eval/219771.htm
- I've been lazy and used a kernel from Sabayon, so if you want to merge kernel-related stuff,
you need to merge and prepare some sources
- to get started, checkout http://en.gentoo-wiki.com/wiki/ICC for some tipps and helpful scripts
- also checkout http://linuxdna.com
- LINGUAS has been set to de&en only
- FEATURES has nodoc noinfo noman to save some space
- no service has been configured, i.e. keyboard-layout is en_US and you need to setup the network
according to your needs
- a revdep-rebuild might be needed, didn't check for that

we are thankful for every good bug-report, even more if you can provide fixes. if you'd like to
join us, have a look at http://trac.faskatech.net/

cheers,
avx // 2010-04-29

Note: the trac-setup ain't complete, yet. @Neo2 has some problems with it.
Download: http://phorcix.org/proj/gentoo_icc/Gentoo_Linux_x86_64.7z.torrent (~330MB, expands to ~1.8GB)
Back to top
View user's profile Send private message
Oopsz
Guru
Guru


Joined: 08 Oct 2002
Posts: 340

PostPosted: Fri Apr 30, 2010 9:49 pm    Post subject: Reply with quote

If you're afraid of steve jobs and hate apple, better unmerge CUPS- they own it. :)
_________________
Pop-before-SMTP with the Gentoo Virtual Mailhosting Guide
Back to top
View user's profile Send private message
MalleRIM
Guru
Guru


Joined: 23 Jul 2007
Posts: 540
Location: Germany

PostPosted: Tue May 18, 2010 11:06 am    Post subject: Reply with quote

Shining Arcanine wrote:
As LLVM/Clang mature, they should reach parity with GCC in terms of software support. At that point, anything that does not compile on them should be invalid code in the first place. Having extra keywords flags should be unnecessary because anything that compiles on one but not another because the code is written around some quirky compiler behavior probably should be masked.

you're probably right that we don't need additional keywords, we don't have different keywords for different versiond of GCC or for icc either. But even if they want to be compatible, it does not mean, they will ever be. We also have packages that don't compile with newer versions of GCC or with icc.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2153
Location: $TERM

PostPosted: Wed May 19, 2010 7:35 am    Post subject: Reply with quote

Hope it's compatible with the traditional C/C++ code.

If Gentoo ever switches, there will be a stage when both will be available. Anyway, it is in portage.
_________________
Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Adobe, Autodesk, Pioneer, Kingston, WD, Yahoo, MSI, XFX
My blog
Back to top
View user's profile Send private message
yoshi314
l33t
l33t


Joined: 30 Dec 2004
Posts: 819
Location: PL

PostPosted: Wed May 19, 2010 2:30 pm    Post subject: Reply with quote

i would support the switch. but i think gentoo, in general, should attempt to support more than one compiler at least for the whole system set.

so far gcc is most supported. icc is not so widely supported, and llvm probably will follow icc's fate, unless it manages to make a difference.

i wouldn't like to see gentoo go all the way with llvm/clang, and abandon gcc.
_________________
~amd64, ~x86
shrink your /usr/portage with squashfs+aufs
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Wed May 19, 2010 8:40 pm    Post subject: Reply with quote

yoshi314 wrote:
i would support the switch. but i think gentoo, in general, should attempt to support more than one compiler at least for the whole system set.

so far gcc is most supported. icc is not so widely supported, and llvm probably will follow icc's fate, unless it manages to make a difference.

i wouldn't like to see gentoo go all the way with llvm/clang, and abandon gcc.


Well, the principle issues with ICC are that it dynamically links everything to its libraries, such that removing it will break a system and that it only supports Intel's architectures. To my knowledge, LLVM/Clang do not suffer from either of those issues.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sun May 23, 2010 4:05 pm    Post subject: Reply with quote

It seems that Clang can now build the Boost C++ libraries:

http://blog.llvm.org/2010/05/clang-builds-boost.html

C++ support could be mature enough by the release of LLVM 2.8 that work could begin on replacing GCC with LLVM/Clang should people wish to work on that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 7 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum