[Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.

Tom Stellard tom at stellard.net
Tue Nov 27 13:51:29 PST 2012


On Sat, Oct 27, 2012 at 06:07:57PM +0200, Johannes Obermayr wrote:
> rtti was removed from more llvm libraries.
> Thanks to d0k for the hint via IRC #llvm on irc.oftc.net

After investigating the alternatives, I think this patch is the best way
to fix this problem.  Using LLVM_CXXFLAGS introduces too many extra flags
and adding -fno-rtti globally breaks clover.  However, the -fno-exceptions
flag shouldn't be needed since gallivm does not use exceptions and this patch
also needs to be fixed so it works for all versions >= 3.2

With an updated patch applied we can revert the original fix:
2e6b81ff7a452459577aaaa94b4d0c7a62c54823 

-Tom

> ---
>  src/gallium/auxiliary/Makefile |    4 ++++
>  1 Datei geändert, 4 Zeilen hinzugefügt(+)
> 
> diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
> index 3ba3f9c..690b7f5 100644
> --- a/src/gallium/auxiliary/Makefile
> +++ b/src/gallium/auxiliary/Makefile
> @@ -3,6 +3,10 @@ include $(TOP)/configs/current
>  
>  LIBNAME = gallium
>  
> +ifeq ($(LLVM_VERSION),3.2)
> +	CXXFLAGS += -fno-exceptions -fno-rtti
> +endif
> +
>  # get source lists
>  include Makefile.sources
>  
> -- 
> 1.7.10.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list