On Tue, Dec 5, 2017 at 5:56 AM, Emil Velikov <[email protected]> wrote: > On 5 December 2017 at 02:21, Rob Herring <[email protected]> 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 <[email protected]> >> Signed-off-by: Rob Herring <[email protected]> > Reviewed-by: Emil Velikov <[email protected]> > > The following shows the macros not set on Android. Feel free to check > if they're supported and toggle them on.
I did this, but did another check of it. > $ 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 At least according to documentation for clang, this is the only other one that is supported. So I turned it on too and pushed the commit. > missing HAVE_FUNC_ATTRIBUTE_WEAK > > -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
