[Git][ghc/ghc][wip/backports-8.8] 2 commits: configure.ac: add --enable-numa switch

Ben Gamari gitlab at gitlab.haskell.org
Sat Jun 20 19:16:58 UTC 2020



Ben Gamari pushed to branch wip/backports-8.8 at Glasgow Haskell Compiler / GHC


Commits:
d1630685 by Sergei Trofimovich at 2020-05-31T12:27:36-04:00
configure.ac: add --enable-numa switch

Before the change ./configure detected numa support automatically
withoun a nice way to disable autodetection.

The change adds `--enable-numa` / `--disable-numa` switch to
override the default. If `--enable-numa` is passed and `libnuma`
is not present then configure will fail.

Reported-by: Sergey Alirzaev
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/955
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
(cherry picked from commit 78afc2c92f94c7bbb94d774adc577aa039119172)

- - - - -
25bd528f by Ben Gamari at 2020-06-20T15:16:25-04:00
hsc2hs: Bump submodule to 0.68.6

Fixes #17995.

- - - - -


2 changed files:

- configure.ac
- utils/hsc2hs


Changes:

=====================================
configure.ac
=====================================
@@ -1259,11 +1259,22 @@ AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw])
 dnl ** Have libnuma?
 dnl --------------------------------------------------------------
 HaveLibNuma=0
-AC_CHECK_HEADERS([numa.h numaif.h])
+AC_ARG_ENABLE(numa,
+    [AC_HELP_STRING([--enable-numa],
+        [Enable NUMA memory policy and thread affinity support in the
+         runtime system via numactl's libnuma [default=auto]])])
 
-if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
+if test "$enable_numa" != "no" ; then
+  AC_CHECK_HEADERS([numa.h numaif.h])
+
+  if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
     AC_CHECK_LIB(numa, numa_available,HaveLibNuma=1)
+  fi
+  if test "$enable_numa:$HaveLibNuma" = "yes:0" ; then
+      AC_MSG_ERROR([Cannot find system libnuma (required by --enable-numa)])]
+  fi
 fi
+
 AC_DEFINE_UNQUOTED([HAVE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma])
 if test $HaveLibNuma = "1" ; then
   AC_SUBST([CabalHaveLibNuma],[True])


=====================================
utils/hsc2hs
=====================================
@@ -1 +1 @@
-Subproject commit efb556cc2689cae42abadae87d778ae20fbc0a14
+Subproject commit b58b4e3770bf4cc84f31602a0a3711ef2013234d



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bc05d3599545ddca50dbd8a557fd71785f6cb6fd...25bd528ff14fefe482cefe8120404acfca7ee56b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bc05d3599545ddca50dbd8a557fd71785f6cb6fd...25bd528ff14fefe482cefe8120404acfca7ee56b
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/20200620/46407588/attachment.html>


More information about the ghc-commits mailing list