[Mesa-dev] [PATCH v2 1/4] Android: fix x86 gallium builds

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 18 17:25:44 UTC 2016


Hi Rob,

On 2 February 2016 at 20:45, Rob Herring <robh at kernel.org> wrote:
> Builds with gallium enabled fail on x86 with linker error:
>
> external/mesa3d/src/mesa/vbo/vbo_exec_array.c:127: error: undefined reference to '_mesa_uint_array_min_max'
>
> The problem is sse_minmax.c is not included in the libmesa_st_mesa
> library. Since the SSE4.1 files are needed for both libmesa_st_mesa
> and libmesa_dricore, move SSE4.1 files into a separate static library
> that can be used by both.
>
> Signed-off-by: Rob Herring <robh at kernel.org>
I realise it's kind of huge for stable, but considering it's Android
only I'm willing to bite the bullet. Does that sound reasonable ?

Cc: "11.1" <mesa-stable at lists.freedesktop.org

> --- a/src/mesa/Android.libmesa_dricore.mk
> +++ b/src/mesa/Android.libmesa_dricore.mk
> @@ -48,9 +48,8 @@ endif # x86
>  endif # MESA_ENABLE_ASM
>
>  ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
> -LOCAL_SRC_FILES += \
> -       main/streaming-load-memcpy.c \
> -       main/sse_minmax.c
> +LOCAL_WHOLE_STATIC_LIBRARIES := \
> +       libmesa_sse41
>  LOCAL_CFLAGS := \
>         -msse4.1 \
>         -DUSE_SSE41

Was about to pick this and noticed that we're should move -msse4.1 to
the new library. I'm assuming that it gets added automatically thus
things works as is ? If so we can/should remove it from here.

> --- a/src/mesa/Makefile.sources
> +++ b/src/mesa/Makefile.sources
> @@ -582,6 +582,10 @@ X86_64_FILES =             \
>         x86-64/x86-64.h \
>         x86-64/xform4.S
>
> +X86_SSE41_FILES = \
> +       main/streaming-load-memcpy.c \
> +       main/sse_minmax.c
> +
We might want to follow up with a separate commit which throws adds
the respective header files in here, and reuses the variable in the
automake build.

Thanks
Emil


More information about the mesa-dev mailing list