You are not logged in.
Pages: 1
Hello
somedays ago i read don't know where that FreeBSD will eventually replace gcc for llvm.
I didnt know what was it so i made a lil research and now i think i know what is it.
My question is if i'm patient enough to compile it and install it, how do i use it to compile software with makepkg?
Hoping you not gonna laught at my face and saying thank you for your help.
Falotromplastero.
Offline
Well, it depends on the software you are trying to build. Most C and C++ projects that have ./configure scripts or Makefiles will let you define a CC and CXX variable to switch the compiler from GCC. You could set these to llvm in /etc/makepkg.conf to give it a shot.
Also, llvm is in community, and clang (C frontend for llvm) is in the AUR.
Good luck!
Offline
I have installed the llvm-gcc package from AUR, is it the same as clang?? And can you tell me how can i specify in makepkg.conf to use llvm instead of gcc.
Thanks.
Falotromplastero
Offline
LLVM is a compiler framework, it is not a compiler for any specific language. That is the job of an LLVM frontend. Clang is an LLVM frontend for C and C++. There is also a GCC frontend to LLVM. You'd need one of those in order to build C and C++ code. Once you have that, you could probably put the path to the compiler in the CC and CXX variables in /etc/makepkg.conf.
You might have issues using LLVM if the build system of whatever package you are trying to build uses some GCC specific flags. If that is the case you'd need to edit the specific package's configure scripts or makefiles or whatever they use.
I'd say it would be worth just getting Clang or GCC-LVM working on some small bit of C or C++ code first, then try to build packages with it later.
EDIT: Check out http://llvm.org to get a better idea of what LLVM is and what it does.
Last edited by tom5760 (2009-06-05 03:59:46)
Offline
Offline
@ Allan
http://clang.llvm.org/cxx_status.html
Here they mention that they are close to what G++ can do.
Do you think it is usable to compile some programs which dont use too complex c++ code? (I dont know nothing about c++, ok?)
I would like to try it.
Offline
Try and see That page has a whole lotta red blocks though.
While LLVM does seem as though it will be faster/better than GCC, and least right now, the main reason the BSDs want to switch is because LLVM and Clang are under permissive licenses (BSD, X11, MIT, etc.) as opposed to copyleft (GPL, LGPL, etc.), which *BSD prefers.
Last edited by Ranguvar (2009-06-23 23:40:18)
Offline
First I need to install it.
Thats where it failed.
Clang-svn from AUR failed to compile. Same error as last comment on AUR page.
Offline
Looks like a fairly simple error, but then, I don't yet know C. I'd report it to upstream. At a guess, it's some GCC 4.4 problem.
Offline
The FreeBSD guys are trying to offer an alternative to GCC to build their base system . They can't achieve that goal with ports because a lot of written software code is GCC-dependent .
English is not my native language .
Offline
Pages: 1