Compile win32.S on 32-bit Darwin as well
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/Makefile.am b/Makefile.am
index e2011e7..7ab945f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -138,6 +138,9 @@ nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
endif
if X86_DARWIN
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
+if X86_DARWIN32
+nodist_libffi_la_SOURCES += src/x86/win32.S
+endif
endif
if SPARC
nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
diff --git a/configure.ac b/configure.ac
index ffcdd49..00b4317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,6 +300,8 @@ AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
AM_CONDITIONAL(X86_WIN64, test x$TARGET = xX86_WIN64)
AM_CONDITIONAL(X86_DARWIN, test x$TARGET = xX86_DARWIN)
+AM_CONDITIONAL(X86_DARWIN32, test x$TARGET = xX86_DARWIN && test $ac_cv_sizeof_size_t = 4)
+AM_CONDITIONAL(X86_DARWIN64, test x$TARGET = xX86_DARWIN && test $ac_cv_sizeof_size_t = 8)
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
diff --git a/generate-darwin-source-and-headers.py b/generate-darwin-source-and-headers.py
index 05b7128..964e861 100644
--- a/generate-darwin-source-and-headers.py
+++ b/generate-darwin-source-and-headers.py
@@ -19,7 +19,7 @@ class simulator_platform(Platform):
prefix = "#ifdef __i386__\n\n"
suffix = "\n\n#endif"
src_dir = 'x86'
- src_files = ['darwin.S', 'ffi.c']
+ src_files = ['darwin.S', 'win32.S', 'ffi.c']
class simulator64_platform(Platform):
@@ -68,7 +68,7 @@ class desktop32_platform(Platform):
triple = 'i386-apple-darwin10'
version_min = '-mmacosx-version-min=10.6'
src_dir = 'x86'
- src_files = ['darwin.S', 'ffi.c']
+ src_files = ['darwin.S', 'win32.S', 'ffi.c']
prefix = "#ifdef __i386__\n\n"
suffix = "\n\n#endif"