[Git][ghc/ghc][wip/rts-configure-2] file

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Nov 4 21:08:24 UTC 2022



Ben Gamari pushed to branch wip/rts-configure-2 at Glasgow Haskell Compiler / GHC


Commits:
717bf847 by Ben Gamari at 2022-11-04T17:08:15-04:00
file

- - - - -


1 changed file:

- + m4/ghc_adjustors_method.m4


Changes:

=====================================
m4/ghc_adjustors_method.m4
=====================================
@@ -0,0 +1,41 @@
+dnl GHC_ADJUSTORS_METHOD(Platform)
+dnl --------------------------------------------------------------
+dnl Use libffi for adjustors?
+AC_DEFUN([GHC_ADJUSTORS_METHOD],
+[
+  case [$]{$1[Arch]} in
+      i386|x86_64)
+          # We have native adjustor support on these platforms
+          HaveNativeAdjustor=yes
+          ;;
+      *)
+          HaveNativeAdjustor=no
+          ;;
+  esac
+
+  AC_MSG_CHECKING([whether to use libffi for adjustors])
+  if test "$CABAL_FLAG_force_libffi_adjustors" = "1" ; then
+      # Use libffi is the user explicitly requested it
+      AdjustorType="libffi"
+  elif test "$HaveNativeAdjustor" = "yes"; then
+      # Otherwise if we have a native adjustor implementation use that
+      AdjustorType="native"
+  else
+      # If we don't have a native adjustor implementation then default to libffi
+      AdjustorType="libffi"
+  fi
+
+  case "$AdjustorType" in
+  libffi)
+      UseLibffiForAdjustors=YES
+      AC_MSG_RESULT([yes])
+      ;;
+  native)
+      UseLibffiForAdjustors=NO
+      AC_MSG_RESULT([no])
+      ;;
+  *)
+      AC_MSG_ERROR([Internal error: Invalid AdjustorType])
+      exit 1
+  esac
+])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/717bf8474efbb1b1cf4b26675adaf5c42a20470a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/717bf8474efbb1b1cf4b26675adaf5c42a20470a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221104/8df63e43/attachment-0001.html>


More information about the ghc-commits mailing list