27 lines
986 B
Diff
27 lines
986 B
Diff
|
Index: ghc-7.8.3/libraries/integer-gmp/gmp/ghc.mk
|
||
|
===================================================================
|
||
|
--- ghc-7.8.3.orig/libraries/integer-gmp/gmp/ghc.mk
|
||
|
+++ ghc-7.8.3/libraries/integer-gmp/gmp/ghc.mk
|
||
|
@@ -66,6 +66,12 @@ else
|
||
|
BUILD_SHARED=no
|
||
|
endif
|
||
|
|
||
|
+ifeq "$(firstword $(subst -, ,$(HOSTPLATFORM)))" "x86_64"
|
||
|
+ FORCE_PIC=--with-pic=yes
|
||
|
+else
|
||
|
+ FORCE_PIC=
|
||
|
+endif
|
||
|
+
|
||
|
# In a bindist, we don't want to know whether /this/ machine has gmp,
|
||
|
# but whether the machine the bindist was built on had gmp.
|
||
|
ifeq "$(BINDIST)" "YES"
|
||
|
@@ -147,7 +153,7 @@ libraries/integer-gmp/gmp/libgmp.a libra
|
||
|
export PATH; \
|
||
|
cd gmpbuild && \
|
||
|
CC=$(CCX) NM=$(NM) AR=$(AR_STAGE1) ./configure \
|
||
|
- --enable-shared=no \
|
||
|
+ --enable-shared=no $(FORCE_PIC) \
|
||
|
--host=$(HOSTPLATFORM) --build=$(BUILDPLATFORM)
|
||
|
$(MAKE) -C libraries/integer-gmp/gmp/gmpbuild MAKEFLAGS=
|
||
|
$(CP) libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/
|