[commit] r2118 - fix building of ffi without libffi when supported

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2118 - fix building of ffi without libffi when supported

commits-3
 
Author: piumarta
Date: 2009-08-31 12:52:56 -0700 (Mon, 31 Aug 2009)
New Revision: 2118

Modified:
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/plugins/SqueakFFIPrims/config.cmake
Log:
fix building of ffi without libffi when supported

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2009-08-31 18:21:47 UTC (rev 2117)
+++ trunk/platforms/unix/ChangeLog 2009-08-31 19:52:56 UTC (rev 2118)
@@ -1,3 +1,8 @@
+2009-08-31    <[hidden email]>
+
+ * plugins/SqueakFFIPrims/config.cmake: Correctly detect arch and
+ abi.  Enable ASM language.
+
 2009-08-31  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
 
  * src/plugins/UnixOSProcessPlugin: Updated to version 20.

Modified: trunk/platforms/unix/plugins/SqueakFFIPrims/config.cmake
===================================================================
--- trunk/platforms/unix/plugins/SqueakFFIPrims/config.cmake 2009-08-31 18:21:47 UTC (rev 2117)
+++ trunk/platforms/unix/plugins/SqueakFFIPrims/config.cmake 2009-08-31 19:52:56 UTC (rev 2118)
@@ -3,25 +3,25 @@
 IF (OPT_without-ffi)
   PLUGIN_DISABLE ()
 ELSE ()
-  IF (${VM_HOST_CPU} STREQUAL "powerpc" OR ${VM_HOST_CPU} STREQUAL "ppc")
+  IF (vm-host-cpu STREQUAL "powerpc" OR vm-host-cpu STREQUAL "ppc")
     SET (cpu ppc)
-  ELSEIF (${VM_HOST_CPU} MATCHES  "i[3456789]86")
+  ELSEIF (vm-host-cpu MATCHES  "i[3456789]86")
     SET (cpu x86)
   ELSE ()
     SET (USE_LIBFFI 1)
   ENDIF ()
 
-  IF (${VM_HOST_OS} STREQUAL "linux")
+  IF (vm-host-os STREQUAL "linux")
     SET (abi sysv)
-  ELSEIF (${VM_HOST_OS} MATCHES "darwin.*")
+  ELSEIF (vm-host-os MATCHES "darwin.*")
     SET (abi darwin)
   ELSE ()
     SET (USE_LIBFFI 1)
   ENDIF ()
 
-  # PLUGIN_MESSAGE ("detected ${cpu}-${abi}")
-
-  IF (USE_LIBFFI OR NOT EXISTS ${plugin}/${cpu}-${abi}.c OR NOT EXISTS ${plugin}/${cpu}-${abi}-asm.S)
+  IF (USE_LIBFFI
+      OR NOT EXISTS "${unix}/plugins/${plugin}/${cpu}-${abi}.c"
+      OR NOT EXISTS "${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S")
     SET (cpu any)
     SET (abi libffi)
     PLUGIN_MESSAGE ("${cpu}-${abi}")
@@ -43,7 +43,8 @@
   ELSE ()
     PLUGIN_DISABLE ()
   ENDIF ()
-    PLUGIN_SOURCES ("${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S")
+  ENABLE_LANGUAGE (ASM)
+  PLUGIN_SOURCES ("${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S")
 ENDIF ()
 
 CONFIG_DEFINE (HAVE_FFI_H)