On 5 December 2017 at 02:21, Rob Herring <r...@kernel.org> wrote:
> Commit 94ca8e04adf6 ("spirv: Add vtn_fail and vtn_assert helpers") broke
> Android builds which have -Werror enabled with the following errors:
>
> external/mesa3d/src/compiler/spirv/spirv_to_nir.c:272:1: error: control may 
> reach end of non-void function [-Werror,-Wreturn-type]
> external/mesa3d/src/compiler/spirv/spirv_to_nir.c:810:1: error: control may 
> reach end of non-void function [-Werror,-Wreturn-type]
> ...
>
> The problem is the noreturn attribute is not enabled and we to define
> HAVE_FUNC_ATTRIBUTE_NORETURN.
>
> Auditing src/util/macros.h, we're also missing
> HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL, so add it too.
>
> Fixes: 94ca8e04adf6 ("spirv: Add vtn_fail and vtn_assert helpers")
> Cc: Jason Ekstrand <jason.ekstr...@intel.com>
> Signed-off-by: Rob Herring <r...@kernel.org>
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

The following shows the macros not set on Android. Feel free to check
if they're supported and toggle them on.

$ for i in `git grep "if.*def.*HAVE_FUNC_ATTRIBUTE_" origin/master  --
 | grep -o "HAVE_FUNC_[A-Z_]*" | sort -u`; do git grep $i
origin/master  | grep
-qi android || echo missing $i; done
missing HAVE_FUNC_ATTRIBUTE_CONST
missing HAVE_FUNC_ATTRIBUTE_MALLOC
missing HAVE_FUNC_ATTRIBUTE_NORETURN
missing HAVE_FUNC_ATTRIBUTE_PURE
missing HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
missing HAVE_FUNC_ATTRIBUTE_VISIBILITY
missing HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT
missing HAVE_FUNC_ATTRIBUTE_WEAK

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

Reply via email to