diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-07 17:37:26 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-18 20:15:30 -0500 |
commit | d7029cc09edc052c2f97effe33233c53340fcce0 (patch) | |
tree | 798f98d3bf72a096efe4577815915b9fdec1a034 /libraries/integer-gmp | |
parent | b4a8ce525fce56eca18358820c0ec35fec8982de (diff) | |
download | haskell-d7029cc09edc052c2f97effe33233c53340fcce0.tar.gz |
Hadrian: refactor GMP in-tree build support (#17756)
* Hadrian doesn't use integer-gmp/config.mk file anymore to determine if
building GMP in-tree is required.
"config.mk" is created by Cabal when the integer-gmp package is
configured and this file is still untracked by Hadrian. This led to a
tricky configure "race" because "config.mk" is built by the
"setup-config" rule, but this rule is also used to find dependencies,
in particular the "ghc-gmp.h" header, but the creation of this file
was depending (without being tracked) on "config.mk".
Now Hadrian only builds in-tree GMP if `--with-intree-gmp` is passed
to the top-level configure script.
* in-tree GMP isn't built once for all in a fixed stage (Stage1)
anymore. It is built per stage which is required if we build a
cross-compiler
* switching between in-tree and external GMP is now supported without
having to clean the build directory first.
* "wrappers.c" now includes "ghc-gmp.h" instead of "ghc.h". It
helps ensuring that the build system generates "ghc-gmp.h".
* build in-tree GMP in "<root>/stageN/gmp/gmpbuild" and produce useful
artefacts (libgmp.a, gmp.h, objs/*.o) in "<root>/stageN/gmp"
Diffstat (limited to 'libraries/integer-gmp')
-rw-r--r-- | libraries/integer-gmp/cbits/wrappers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/integer-gmp/cbits/wrappers.c b/libraries/integer-gmp/cbits/wrappers.c index 2b5db34f46..ef1bdead2f 100644 --- a/libraries/integer-gmp/cbits/wrappers.c +++ b/libraries/integer-gmp/cbits/wrappers.c @@ -12,6 +12,7 @@ #include "HsFFI.h" #include "MachDeps.h" #include "HsIntegerGmp.h" +#include "ghc-gmp.h" #include <assert.h> #include <stdbool.h> @@ -22,7 +23,6 @@ #include <float.h> #include <stdio.h> -#include <gmp.h> // GMP 4.x compatibility |