[commit: ghc] master: Fix build for i386/windows. (22625f7)
git at git.haskell.org
git at git.haskell.org
Fri Aug 23 19:30:53 CEST 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/22625f7213ea6619e5b1d7248cb47439036aac47/ghc
>---------------------------------------------------------------
commit 22625f7213ea6619e5b1d7248cb47439036aac47
Author: Austin Seipp <aseipp at pobox.com>
Date: Fri Aug 23 12:27:53 2013 -0500
Fix build for i386/windows.
symbol_extras is only part of ObjectCode on certain platforms.
Signed-off-by: Austin Seipp <aseipp at pobox.com>
>---------------------------------------------------------------
22625f7213ea6619e5b1d7248cb47439036aac47
rts/Linker.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index fe0a7ed..b193149 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -2046,9 +2046,8 @@ mmap_again:
void freeObjectCode (ObjectCode *oc)
{
- int pagesize, size, r;
-
#ifdef USE_MMAP
+ int pagesize, size, r;
pagesize = getpagesize();
size = ROUND_UP(oc->fileSize, pagesize);
@@ -2067,7 +2066,13 @@ void freeObjectCode (ObjectCode *oc)
#else
stgFree(oc->image);
+
+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(arm_HOST_ARCH)
+#if !defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS)
stgFree(oc->symbol_extras);
+#endif
+#endif
+
#endif
More information about the ghc-commits
mailing list