Couple things about the patch: should PTHREAD_CFLAGS be added to 
COMMON_CXXFLAGS to avoid needing to modify the section for each architecture?  
The KNL and SKX sections should have similar changes.

I’ve tested that the scons binaries work on linux, and George tests them on 
windows.

-Tim

> On Jul 21, 2017, at 7:53 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> 
> From: Emil Velikov <emil.veli...@collabora.com>
> 
> The variable name was missing a leading LD_, which resulted in the
> backend binaries having unresolved symbols.
> 
> Thanks to Laurent for the list.
> 
> The fix is applicable for stable as well, although the actual pthread
> linking may not be. That plus additional [missing] links will be
> resolved in that branch.
> 
> Cc: mesa-sta...@lists.freedesktop.org
> Cc: Bruce Cherniak <bruce.chern...@intel.com>
> Cc: Tim Rowley <timothy.o.row...@intel.com>
> Cc: Laurent Carlier <lordhea...@gmail.com>
> Reported-by: Laurent Carlier <lordhea...@gmail.com>
> Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> ---
> Laurent, the output of `ldd -r $binary` should be free of undefined
> symbols. Can you give it a quick test?
> 
> Tim, Bruce - the new backends might need the PTHREAD* bits.
> The SCons build has the -Wl,no-undef... parts but one might want to
> double-check the binaries it produced.
> 
> Thanks
> ---
> src/gallium/drivers/swr/Makefile.am | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/swr/Makefile.am 
> b/src/gallium/drivers/swr/Makefile.am
> index 74612280fe7..3bffa9595d5 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -222,11 +222,12 @@ COMMON_LDFLAGS = \
>       -module \
>       -no-undefined \
>       $(GC_SECTIONS) \
> -     $(NO_UNDEFINED)
> +     $(LD_NO_UNDEFINED)
> 
> lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
> 
> libswrAVX_la_CXXFLAGS = \
> +     $(PTHREAD_CFLAGS) \
>       $(SWR_AVX_CXXFLAGS) \
>       -DKNOB_ARCH=KNOB_ARCH_AVX \
>       $(COMMON_CXXFLAGS)
> @@ -234,10 +235,14 @@ libswrAVX_la_CXXFLAGS = \
> libswrAVX_la_SOURCES = \
>       $(COMMON_SOURCES)
> 
> +libswrAVX_la_LIBADD = \
> +     $(PTHREAD_LIBS)
> +
> libswrAVX_la_LDFLAGS = \
>       $(COMMON_LDFLAGS)
> 
> libswrAVX2_la_CXXFLAGS = \
> +     $(PTHREAD_CFLAGS) \
>       $(SWR_AVX2_CXXFLAGS) \
>       -DKNOB_ARCH=KNOB_ARCH_AVX2 \
>       $(COMMON_CXXFLAGS)
> @@ -245,6 +250,9 @@ libswrAVX2_la_CXXFLAGS = \
> libswrAVX2_la_SOURCES = \
>       $(COMMON_SOURCES)
> 
> +libswrAVX2_la_LIBADD = \
> +     $(PTHREAD_LIBS)
> +
> libswrAVX2_la_LDFLAGS = \
>       $(COMMON_LDFLAGS)
> 
> -- 
> 2.13.0
> 
> _______________________________________________
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to