From: Clemens Fruhwirth Date: Tue, 1 Jan 2008 15:40:17 +0000 (+0000) Subject: Link libgmp.a statically into libHSrts.dll on Windows X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=086bab42386098009471c46139013c41f40856a2 Link libgmp.a statically into libHSrts.dll on Windows --- diff --git a/rts/Linker.c b/rts/Linker.c index 7793801..e239184 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -463,6 +463,23 @@ typedef struct _RtsSymbolVal { SymX(stg_ap_pppppp_ret) #endif +/* On Windows, we link libgmp.a statically into libHSrts.dll */ +#ifdef mingw32_HOST_OS +#define GMP_SYMS \ + SymX(__gmpz_cmp) \ + SymX(__gmpz_cmp_si) \ + SymX(__gmpz_cmp_ui) \ + SymX(__gmpz_get_si) \ + SymX(__gmpz_get_ui) +#else +#define GMP_SYMS \ + SymExtern(__gmpz_cmp) \ + SymExtern(__gmpz_cmp_si) \ + SymExtern(__gmpz_cmp_ui) \ + SymExtern(__gmpz_get_si) \ + SymExtern(__gmpz_get_ui) +#endif + #define RTS_SYMBOLS \ Maybe_Stable_Names \ Sym(StgReturn) \ @@ -502,12 +519,7 @@ typedef struct _RtsSymbolVal { SymX(__encodeDouble) \ SymX(__encodeFloat) \ SymX(addDLL) \ - SymExtern(__gmpn_gcd_1) \ - SymExtern(__gmpz_cmp) \ - SymExtern(__gmpz_cmp_si) \ - SymExtern(__gmpz_cmp_ui) \ - SymExtern(__gmpz_get_si) \ - SymExtern(__gmpz_get_ui) \ + GMP_SYMS \ SymX(__int_encodeDouble) \ SymX(__int_encodeFloat) \ SymX(andIntegerzh_fast) \ diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 373f192..06628b9 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -28,6 +28,7 @@ #include "Cmm.h" #ifdef __PIC__ +#ifndef mingw32_HOST_OS import __gmpz_init; import __gmpz_add; import __gmpz_sub; @@ -44,6 +45,7 @@ import __gmpz_and; import __gmpz_xor; import __gmpz_ior; import __gmpz_com; +#endif import base_GHCziIOBase_NestedAtomically_closure; import pthread_mutex_lock; import pthread_mutex_unlock;