Hi, I read on the gentoo website http://en.gentoo-wiki.com/wiki/Llvm that glibc cannot be compiled using llvm because of some GNU extensions which LLVM does not support. Has there been any success in compiling glibc using LLVM so as to get the bytecode? We are looking to do whole program analysis to look at control flows including those in libc... we were hoping that we could get the control flows using LLVM API's for glibc. Has anyone tried this before? Thanks Nipun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120126/d35eb9d6/attachment.html>
Hi Nipun, As you say, glibc is rather GCC -oriented. I certainly haven't tried this myself, but have you thought of using an alternate C library such as RedHat newlib? That can certainly be compiled by clang (we do it every night). Cheers, James From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Nipun Arora Sent: 26 January 2012 15:54 To: LLVM Developers Mailing List Subject: [LLVMdev] Compiling glibc with LLVM Hi, I read on the gentoo website <http://en.gentoo-wiki.com/wiki/Llvm> http://en.gentoo-wiki.com/wiki/Llvm that glibc cannot be compiled using llvm because of some GNU extensions which LLVM does not support. Has there been any success in compiling glibc using LLVM so as to get the bytecode? We are looking to do whole program analysis to look at control flows including those in libc... we were hoping that we could get the control flows using LLVM API's for glibc. Has anyone tried this before? Thanks Nipun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120126/a3738abe/attachment.html>
On 26/01/12 10:54 AM, Nipun Arora wrote:> Hi, > > I read on the gentoo website http://en.gentoo-wiki.com/wiki/Llvm that > glibc cannot be compiled using llvm because of some GNU extensions which > LLVM does not support.I am sure there is more than one gcc dependency in glibc, but the main one I can remember is its use of -fno-toplevel-reorder, which we really don't want to have in llvm/clang.> Has there been any success in compiling glibc using LLVM so as to get > the bytecode? > We are looking to do whole program analysis to look at control flows > including those in libc... we were hoping that we could get the control > flows using LLVM API's for glibc. > > Has anyone tried this before? > > Thanks > Nipun >Cheers, Rafael
Hi James, What kind of config parameters are needed to build newlib into bytecode? Thanks, Sam James Molloy-3 wrote:> > Hi Nipun, > > > > As you say, glibc is rather GCC -oriented. I certainly haven't tried this > myself, but have you thought of using an alternate C library such as > RedHat > newlib? That can certainly be compiled by clang (we do it every night). > > > > Cheers, > > > James > > > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On > Behalf Of Nipun Arora > Sent: 26 January 2012 15:54 > To: LLVM Developers Mailing List > Subject: [LLVMdev] Compiling glibc with LLVM > > > > Hi, > > > > I read on the gentoo website <http://en.gentoo-wiki.com/wiki/Llvm> > http://en.gentoo-wiki.com/wiki/Llvm that glibc cannot be compiled using > llvm > because of some GNU extensions which LLVM does not support. > > > > Has there been any success in compiling glibc using LLVM so as to get the > bytecode? > > We are looking to do whole program analysis to look at control flows > including those in libc... we were hoping that we could get the control > flows using LLVM API's for glibc. > > > > Has anyone tried this before? > > > > Thanks > > Nipun > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- View this message in context: http://old.nabble.com/Compiling-glibc-with-LLVM-tp33208354p33763366.html Sent from the LLVM - Dev mailing list archive at Nabble.com.