configure: Check if --disable-stdcall-fixup is supported before using it.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-05-15 19:22:55 +02:00 committed by Alexandre Julliard
parent 033713b0ae
commit cecd09ceb9
2 changed files with 27 additions and 2 deletions

26
configure vendored
View File

@ -8237,7 +8237,31 @@ fi
LIBEXT="dll" LIBEXT="dll"
DLLEXT="" DLLEXT=""
case $host_cpu in case $host_cpu in
*i[3456]86*) LDDLLFLAGS="-Wl,--disable-stdcall-fixup" ;; *i[3456]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--disable-stdcall-fixup" >&5
$as_echo_n "checking whether the compiler supports -Wl,--disable-stdcall-fixup... " >&6; }
if ${ac_cv_cflags__Wl___disable_stdcall_fixup+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -Wl,--disable-stdcall-fixup"
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__Wl___disable_stdcall_fixup=yes
else
ac_cv_cflags__Wl___disable_stdcall_fixup=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl___disable_stdcall_fixup" >&5
$as_echo "$ac_cv_cflags__Wl___disable_stdcall_fixup" >&6; }
if test "x$ac_cv_cflags__Wl___disable_stdcall_fixup" = xyes; then :
LDDLLFLAGS="-Wl,--disable-stdcall-fixup"
fi ;;
esac esac
enable_iphlpapi=${enable_iphlpapi:-no} enable_iphlpapi=${enable_iphlpapi:-no}
enable_kernel32=${enable_kernel32:-no} enable_kernel32=${enable_kernel32:-no}

View File

@ -727,7 +727,8 @@ case $host_os in
DLLEXT="" DLLEXT=""
dnl Disable stdcall fixups to catch prototype mismatches dnl Disable stdcall fixups to catch prototype mismatches
case $host_cpu in case $host_cpu in
*i[[3456]]86*) LDDLLFLAGS="-Wl,--disable-stdcall-fixup" ;; *i[[3456]]86*) WINE_TRY_CFLAGS([-Wl,--disable-stdcall-fixup],
[LDDLLFLAGS="-Wl,--disable-stdcall-fixup"]) ;;
esac esac
dnl Disable modules that can't be used on Windows dnl Disable modules that can't be used on Windows
enable_iphlpapi=${enable_iphlpapi:-no} enable_iphlpapi=${enable_iphlpapi:-no}