[Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm

Emil Velikov emil.l.velikov at gmail.com
Fri Oct 24 16:54:37 PDT 2014


On 24/10/14 17:03, Jan Vesely wrote:
> -Wl,--exclude-libs prevents automatic export of symbols
> 
> 
> CC: Kai Wasserbach <kai at dev.carbon-project.org>
> CC: Emil Velikov <emil.l.velikov at gmail.com>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> 
> Kai,
> can you try this patch with your setup, and check whether LLVM symbols are
> exported from mesa library? (and it's still working)
> 
> Emil,
> would it help to have --exclude-libs ALL enabled globally?
> 
Haven't really looked up on the documentation about it, yet there should
be no (unneeded) exported symbols thanks to the version scripts.
As such I'm not entirely sure what this patch (attempts to) resolve :(

-Emil

> jan
> 
>  configure.ac | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 3c76deb..b4b4b13 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then
>             dnl already added all of these objects to LLVM_LIBS.
>          fi
>      else
> -        AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues])
> +        AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues])
> +	dnl Don't export symbols automatically
> +	dnl TODO: Do we want to list llvm libs explicitly here?
> +	LLVM_LDFLAGS+=" -Wl,exclude-libs ALL"
> +	dnl We need to link to llvm system libs when using static libs
> +	dnl However, only llvm 3.5+ provides --system-libs
> +	if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
> +		LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`"
> +	fi
>      fi
>  fi
>  
> 



More information about the mesa-dev mailing list