On Sun, 22 Aug 2010 05:35:19 -0400, nobled <[email protected]> wrote:
> The first three attached patches make it possible to compile Mesa with
> LLVM/Clang:
> 1. Add -lstdc++ when linking glsl_compiler and glcpp
> 2. Move -lstdc++ from the Gallium-specific Makefile.dri to
> DRI_LIB_DEPS in configure (fixes linking classic Mesa drivers)
> 3. Since autoconf gives GCC=yes even when using clang (since it just
> tests for the __GNUC__ macro), don't check for a minimum version of
> 3.3 if $(CC) points to a clang executable. (unfortunately I'm not sure
> how to properly detect clang, short of test-compiling a file that
> contains #ifdef __clang__. I.e. if $(CC) = 'cc', and 'cc' is an
> alternatives symlink to llvm-clang, this doesn't detect that case.)

From #llvm:

<anholt> is it intended that when linking a c++ app with clang that -lstdc++ 
has to be explicitly specified?
<aKor> anholt: link via clang++
<aKor> :)
<nicholas> yes, same as with gcc. try linking with clang++ instead.
<anholt> ah, my 2.7 clang packages don't come with a clang++ binary
<dgregor> anholt: don't use 2.7 for C++. For c++, you'll need to use
clang from Subversion
<dgregor> anholt: adding -lstdc++ is the wrong solution. clang++ is just
a symlink to clang, by the way. you can add it yourself

Attachment: pgpsDmHVMsln5.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to