Skip to content
Snippets Groups Projects
Commit 21e0862c authored by Teo Camarasu's avatar Teo Camarasu
Browse files

Fix build of packman

HEAD now exports HeapAlloc.h
parent 07f09475
No related branches found
No related tags found
1 merge request!358This fixes a couple of issues building against GHC master
diff --git a/cbits/GhcHeapAlloc.h b/cbits/GhcHeapAlloc.h
index 0ec1e6d..65b9f43 100644
--- a/cbits/GhcHeapAlloc.h
+++ b/cbits/GhcHeapAlloc.h
@@ -51,11 +51,13 @@
#ifdef USE_LARGE_ADDRESS_SPACE
+#ifndef HEAP_ALLOC_PUBLIC
struct mblock_address_range {
W_ begin, end;
W_ padding[6]; // ensure nothing else inhabits this cache line
} ATTRIBUTE_ALIGNED(64);
extern struct mblock_address_range mblock_address_space;
+#endif
# define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space.begin && \
(W_)(p) < (mblock_address_space.end))
diff --git a/cbits/Pack.c b/cbits/Pack.c
index 2c73161..27007c2 100644
--- a/cbits/Pack.c
......@@ -71,3 +89,16 @@ index 2c73161..27007c2 100644
= get_fun_itbl(UNTAG_CLOSURE(p));
strcat(fp, "|");
switch (funInfo->f.fun_type) {
diff --git a/packman.cabal b/packman.cabal
index 04bd6bd..fc52685 100644
--- a/packman.cabal
+++ b/packman.cabal
@@ -88,6 +88,8 @@ library
cc-options: -g -DDEBUG -DLIBRARY_CODE
else
cc-options: -DLIBRARY_CODE
+ if impl(ghc > 9.11.0)
+ cc-options: -DHEAP_ALLOC_PUBLIC
test-suite simpletest
type: exitcode-stdio-1.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment