Modify configure.host to detect compilation with Microsoft Visual C++ and use assembly with Intel syntax in that case

This commit is contained in:
Ramón García Fernández
2017-01-08 20:34:44 +01:00
parent 60e4250a77
commit 1e0d107b4b
2 changed files with 246 additions and 2 deletions
+9 -2
View File
@@ -65,13 +65,16 @@ case "${host}" in
;;
i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix* \
| x86_64-*-cygwin* | x86_64-*-mingw*)
| x86_64-*-cygwin* | x86_64-*-mingw* | x86_64-*-winnt* )
TARGETDIR=x86
if test $ac_cv_sizeof_size_t = 4; then
TARGET=X86_WIN32
else
TARGET=X86_WIN64
fi
if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
MSVC=1
fi
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
# or cross-build and select where to install dlls appropriately.
@@ -249,7 +252,11 @@ case "${TARGET}" in
SOURCES="ffi64.c unix64.S ffiw64.c win64.S"
;;
X86_WIN64)
SOURCES="ffiw64.c win64.S"
if test "$MSVC" = 1; then
SOURCES="ffiw64.c win64_intel.S"
else
SOURCES="ffiw64.c win64.S"
fi
;;
esac