configure: Check for linker delayload support on mingw hosts.
Fixes PE-only builds with llvm-mingw. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9bc3a9f78b
commit
4b362d016c
|
@ -17456,7 +17456,32 @@ fi ;;
|
|||
MSVCRTFLAGS=""
|
||||
|
||||
case $host_os in
|
||||
mingw32*) ;;
|
||||
mingw32*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-delayload,autoconftest.dll" >&5
|
||||
$as_echo_n "checking whether the compiler supports -Wl,-delayload,autoconftest.dll... " >&6; }
|
||||
if ${ac_cv_cflags__Wl__delayload_autoconftest_dll+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Wl,-delayload,autoconftest.dll"
|
||||
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__delayload_autoconftest_dll=yes
|
||||
else
|
||||
ac_cv_cflags__Wl__delayload_autoconftest_dll=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__delayload_autoconftest_dll" >&5
|
||||
$as_echo "$ac_cv_cflags__Wl__delayload_autoconftest_dll" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl__delayload_autoconftest_dll" = xyes; then :
|
||||
DELAYLOADFLAG="-Wl,-delayload,"
|
||||
|
||||
fi ;;
|
||||
*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-builtin" >&5
|
||||
$as_echo_n "checking whether the compiler supports -fno-builtin... " >&6; }
|
||||
if ${ac_cv_cflags__fno_builtin+:} false; then :
|
||||
|
|
|
@ -2060,7 +2060,8 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
|
|||
dnl Disable gcc builtins except for Mingw
|
||||
AC_SUBST(MSVCRTFLAGS,"")
|
||||
case $host_os in
|
||||
mingw32*) ;;
|
||||
mingw32*) dnl Check for delayload linker support
|
||||
WINE_TRY_CFLAGS([-Wl,-delayload,autoconftest.dll],[AC_SUBST(DELAYLOADFLAG,["-Wl,-delayload,"])]) ;;
|
||||
*) WINE_TRY_CFLAGS([-fno-builtin],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-builtin"])
|
||||
WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"]) ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue