summaryrefslogtreecommitdiff
path: root/configure.host
diff options
context:
space:
mode:
authorRamón García Fernández <ramon.garcia.f@gmail.com>2017-01-08 20:12:59 +0100
committerRamón García Fernández <ramon.garcia.f@gmail.com>2017-01-08 20:34:44 +0100
commit1e0d107b4b237edd11ca3209a9cf59786f752fe5 (patch)
tree672fa4d0369c0b2541119aa0cc70cb2a1afa48d1 /configure.host
parent60e4250a77eb3fde500bfd68ec40519fe34b21bd (diff)
downloadlibffi-1e0d107b4b237edd11ca3209a9cf59786f752fe5.tar.gz
Modify configure.host to detect compilation with Microsoft Visual C++ and use assembly with Intel syntax in that case
Diffstat (limited to 'configure.host')
-rw-r--r--configure.host11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.host b/configure.host
index a4a22b7..f20ec35 100644
--- a/configure.host
+++ b/configure.host
@@ -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