Commit 59b5b79c authored by Martin Storsjö's avatar Martin Storsjö Committed by Alexandre Julliard

configure: Downgrade -Wincompatible-function-pointer-types to a warning on ARM.

Clang 16 is defaulting -Wincompatible-function-pointer-types to an error instead of a warning. This isn't an issue for most of Wine, but the error shows up in a lot of cases if doing a non-PE build for ARM (32 bit, 64 has no such issues), in particular around the integration of libxml2 and faudio. The root cause of the issue is that some functions are specified with e.g. __attribute__((pcs("aapcs-vfp"))) - which is equal to the default calling convention when compiling with -mfloat-abi=hard - but Clang's warning doesn't treat such function pointers as equal. (This could maybe be considered a bug or limitation in Clang though.) There's also some smaller amount of cases where our attributes actually do conflict, where we mix __attribute__((pcs("aapcs"))), i.e. arm softfloat calling convention, with the default calling convention (which is set to hardfloat), but they drown in the noise from the other ones. Therefore, on arm, try to downgrade this diagnostic back to a warning, not an error - while keeping the warnings visible. Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 8c46e2a8
......@@ -19413,6 +19413,35 @@ printf "%s\n" "$ac_cv_mabi_ms" >&6; }
fi
MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms" ;;
esac ;;
arm*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wincompatible-function-pointer-types" >&5
printf %s "checking whether the compiler supports -Wincompatible-function-pointer-types... " >&6; }
if test ${ac_cv_cflags__Wincompatible_function_pointer_types+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -Wincompatible-function-pointer-types"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_cflags__Wincompatible_function_pointer_types=yes
else $as_nop
ac_cv_cflags__Wincompatible_function_pointer_types=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wincompatible_function_pointer_types" >&5
printf "%s\n" "$ac_cv_cflags__Wincompatible_function_pointer_types" >&6; }
if test "x$ac_cv_cflags__Wincompatible_function_pointer_types" = xyes
then :
EXTRACFLAGS="$EXTRACFLAGS -Wno-error=incompatible-function-pointer-types"
fi ;;
esac
CFLAGS=$saved_CFLAGS
......
......@@ -1931,6 +1931,8 @@ int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }]
fi
MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms" ;;
esac ;;
arm*)
WINE_TRY_CFLAGS([-Wincompatible-function-pointer-types],[EXTRACFLAGS="$EXTRACFLAGS -Wno-error=incompatible-function-pointer-types"]) ;;
esac
CFLAGS=$saved_CFLAGS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment