[Mesa-dev] [PATCH 5/7] broadcom/vc4: Build the vc4_tiling_lt_neon.c with -mfpu=neon on ARM.

Rob Herring robh at kernel.org
Wed Aug 9 20:21:46 UTC 2017


On Tue, Aug 8, 2017 at 3:19 PM, Eric Anholt <eric at anholt.net> wrote:
> If you don't pass this, the compiler refuses to compile the assembly for
> pre-v7 CPUs.  This also keeps us from building identical, non-NEON code on
> aarch64 and x86.
>
> Fixes: a373f77662c5 ("vc4: Use a wrapper file to set VC4_BUILD_NEON instead of CFLAGS.")
> ---
>  src/gallium/drivers/vc4/Android.mk       | 10 ++++++++++
>  src/gallium/drivers/vc4/Makefile.am      |  7 +++++++
>  src/gallium/drivers/vc4/Makefile.sources |  3 ++-
>  src/gallium/drivers/vc4/vc4_tiling.h     | 17 +++++++++++------
>  4 files changed, 30 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/drivers/vc4/Android.mk b/src/gallium/drivers/vc4/Android.mk
> index 84bfaa839f9e..eaf66ebe8cb9 100644
> --- a/src/gallium/drivers/vc4/Android.mk
> +++ b/src/gallium/drivers/vc4/Android.mk
> @@ -23,6 +23,15 @@ LOCAL_PATH := $(call my-dir)
>  # get C_SOURCES
>  include $(LOCAL_PATH)/Makefile.sources
>
> +# First, the architecture-specific library.
> +ifeq ($(TARGET_ARCH),arm)

This should probably be more specific. However, Android doesn't
actually support v6 builds, but it does support armv5te builds. IOW,
for the case you care about, you can't actually build.

> +include $(CLEAR_VARS)
> +LOCAL_SRC_FILES := $(NEON_C_SOURCES)
> +LOCAL_CFLAGS := -mfpu=neon
> +LOCAL_MODULE := libmesa_broadcom_vc4_neon
> +BROADCOM_VC4_NEON_LIB := $(LOCAL_MODULE)

You need an "include $(BUILD_STATIC_LIBRARY)" here to actually build the lib.

> +endif
> +
>  include $(CLEAR_VARS)
>
>  LOCAL_SRC_FILES := \
> @@ -37,6 +46,7 @@ LOCAL_STATIC_LIBRARIES := \
>         libmesa_nir
>
>  LOCAL_WHOLE_STATIC_LIBRARIES := \
> +       $(BROADCOM_VC4_NEON_LIB) \
>         libmesa_broadcom_cle \
>         libmesa_broadcom_genxml
>


More information about the mesa-dev mailing list