diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-11-29 16:50:04 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-29 16:50:05 -0500 |
commit | 795f8bd460d604c792a5df8cfec937b2a74c3956 (patch) | |
tree | 26f34e103a7769c7a98aeea41b6bf1d8a5a86832 /ghc/hschooks.c | |
parent | fe3748bc8631afb9a7cd1a74340783eee7c495f6 (diff) | |
download | haskell-795f8bd460d604c792a5df8cfec937b2a74c3956.tar.gz |
hschooks.c: Ensure correct header file is included
Consider the case of building a stage1 compiler. `hschooks.c` will be
built by stage0 `ghc` and linked against the `stage0` RTS. Despite this
it was #including the stage1 `Rts.h`. There is, of course, no guarantee
that this is ABI-compatible with the stage0 RTS and when they diverge
Bad Things happen (e.g. bells ringing at inappropriate times in D2699).
Test Plan: Validate
Reviewers: simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2763
Diffstat (limited to 'ghc/hschooks.c')
-rw-r--r-- | ghc/hschooks.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ghc/hschooks.c b/ghc/hschooks.c index 3a42801c11..9b1be56db2 100644 --- a/ghc/hschooks.c +++ b/ghc/hschooks.c @@ -5,11 +5,18 @@ in instead of the defaults. */ #include "../rts/PosixSource.h" -#include "../includes/Rts.h" + +/* + * This should be linked against Rts.h from the compiler which is compiling us. + * For instance, if we are compiling this file to produce the stage1 compiler, + * we should use Rts.h from stage0. + */ +#include "Rts.h" #include "HsFFI.h" #include <string.h> +#include <stdbool.h> #ifdef HAVE_UNISTD_H #include <unistd.h> |