[cfe-dev] Typeid and forward declaration - Clarification needed
Karen Shaeffer
shaeffer at neuralscape.com
Fri Nov 1 17:09:37 PDT 2013
On Thu, Oct 31, 2013 at 02:51:46AM +0000, Karen Shaeffer wrote:
> On Wed, Oct 30, 2013 at 11:51:13PM +0000, Karen Shaeffer wrote:
> > On Wed, Oct 30, 2013 at 10:24:50PM +0000, Karen Shaeffer wrote:
> > >
> > > I work with Ubuntu 13.10 these days and am quite pleased to learn clang-3.3 is supported
> > > by Ubuntu Saucy universe repositories.
> > >
> > > root at ip-212-12-37-96:/etc/apt# dpkg --get-selections | grep llvm
> > > libllvm3.3:amd64 install
> > > llvm-3.3 install
> > > llvm-3.3-dev install
> > > llvm-3.3-doc install
> > > llvm-3.3-runtime install
> > > root at ip-212-12-37-96:/etc/apt# dpkg --get-selections | grep clang
> > > clang-3.3 install
> > > libclang-common-3.3-dev install
> > > libclang1-3.3 install
> > >
> > > My understanding is clang-3.3 provides full support for c++11 standard. That is one of my
> > > requirements. Next step is to do comparison testing on performance of compiled binaries.
> > > That is a critically important metric I am looking at.
> >
> > $ ldd /usr/bin/clang
> > linux-vdso.so.1 => (0x00007fffc99fe000)
> > libLLVM-3.3.so.1 => /usr/lib/x86_64-linux-gnu/libLLVM-3.3.so.1 (0x00007f41cfe0d000)
> > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f41cfbf0000)
> > libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f41cf8eb000)
> > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f41cf6d5000)
> > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f41cf30d000)
> > libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f41cf104000)
> > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f41cef00000)
> > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f41cebfc000)
> > /lib64/ld-linux-x86-64.so.2 (0x00007f41d148b000)
> >
> > I guess you need to roll your own to use libc++. Even so, it is a great jumping off point
> > to have all this available on Ubuntu Saucy without needing to be a pioneer. Maybe I'll use
> > this compiler to start a bootstrap of the 3.4 release in January.
>
> This tool chain doesn't actually work out of the box on Ubuntu. I see clang needs
> binutils-gold. I am OK with that. But after looking into it, I apparently need to break
> my default GNU tool chain to use it. I am not willing to do that.
>
Of course, I can grab all the sources and build my own clang/llvm tool chain, and then I can
configure the build to coexist with the default GNU tool chain. But then I would be maintaining
that tool chain. Not something I want to invest in right now. Eventually, I'll do that.
But even with these Ubuntu packages, the compiler does work. And I can compile without
linking, enabling me to see all the error and warning messages clang emits. And this has
been an eye opener -- to compile code with 'g++ -Wall -std=c++11' and then to compile
the same code with clang. Its becoming quite clear very quickly there is a world of
difference in these two compilers in the context of errors and warnings. Shocking what
I am seeing. +1 to clang/llvm in this context.
enjoy,
Karen
--
Karen Shaeffer Be aware: If you see an obstacle in your path,
Neuralscape Services that obstacle is your path. Zen proverb
More information about the cfe-dev
mailing list