Ticket #4022: patch-libraries_integer-gmp_gmp_ghc.mk

File patch-libraries_integer-gmp_gmp_ghc.mk, 951 bytes (added by pgj, 4 years ago)

A fix for the problem

Line 
1--- libraries/integer-gmp/gmp/ghc.mk.orig       2010-05-24 02:23:44.000000000 +0200
2+++ libraries/integer-gmp/gmp/ghc.mk            2010-05-24 04:03:32.000000000 +0200
3@@ -36,6 +36,12 @@
4 BUILD_SHARED=no
5 endif
6 
7+ifeq "$(HOSTPLATFORM)" "x86_64-unknown-freebsd"
8+FORCE_PIC=--with-pic=yes
9+else
10+FORCE_PIC=
11+endif
12+
13 # In a bindist, we don't want to know whether /this/ machine has gmp,
14 # but whether the machine the bindist was built on had gmp.
15 ifeq "$(BINDIST)" "YES"
16@@ -117,7 +123,7 @@
17            export PATH; \
18            cd gmpbuild && \
19            CC=$(WhatGccIsCalled) NM=$(NM) $(SHELL) configure \
20-                 --enable-shared=no --host=$(PLATFORM) --build=$(PLATFORM)
21+                 --enable-shared=no $(FORCE_PIC) --host=$(PLATFORM) --build=$(PLATFORM)
22        $(MAKE) -C libraries/integer-gmp/gmp/gmpbuild MAKEFLAGS=
23        $(CP) libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/
24        $(CP) libraries/integer-gmp/gmp/gmpbuild/.libs/libgmp.a libraries/integer-gmp/gmp/