From 1d713a48e4a955944083091490b901540f47c80d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= <larryv@macports.org>
Date: Fri, 12 Sep 2014 23:02:14 -0400
Subject: [PATCH] gmp: Use correct symbol lookup on Yosemite (#44596)
The configure script incorrectly detects MACOSX_DEPLOYMENT_TARGET and
links using `-undefined suppress` instead of `-undefined dynamic_lookup`,
causing dyld to segfault when it tries to load undefined symbols.
---
dports/devel/gmp/Portfile | 3 +++
.../devel/gmp/files/yosemite-symbol-lookup.patch | 26 ++++++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 dports/devel/gmp/files/yosemite-symbol-lookup.patch
diff --git a/dports/devel/gmp/Portfile b/dports/devel/gmp/Portfile
index 86673cf..5a49e3b 100644
a
|
b
|
PortGroup muniversal 1.0 |
6 | 6 | |
7 | 7 | name gmp |
8 | 8 | version 6.0.0 |
| 9 | revision 1 |
9 | 10 | categories devel math |
10 | 11 | license LGPL-3+ |
11 | 12 | maintainers mcalhoun openmaintainer |
… |
… |
use_parallel_build yes |
36 | 37 | # See https://gmplib.org/list-archives/gmp-announce/2014-March/000042.html |
37 | 38 | distfiles ${name}-${version}a${extract.suffix} |
38 | 39 | |
| 40 | patchfiles yosemite-symbol-lookup.patch |
| 41 | |
39 | 42 | configure.args --enable-cxx |
40 | 43 | |
41 | 44 | # Prevent precompiled binaries. |
diff --git a/dports/devel/gmp/files/yosemite-symbol-lookup.patch b/dports/devel/gmp/files/yosemite-symbol-lookup.patch
new file mode 100644
index 0000000..9fe1873
-
|
+
|
|
| 1 | Index: aclocal.m4 |
| 2 | =================================================================== |
| 3 | --- aclocal.m4.orig |
| 4 | +++ aclocal.m4 |
| 5 | @@ -1066,7 +1066,7 @@ _LT_EOF |
| 6 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in |
| 7 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) |
| 8 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
| 9 | - 10.[[012]]*) |
| 10 | + 10.[[012]][[,.]]*) |
| 11 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; |
| 12 | 10.*) |
| 13 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
| 14 | Index: configure |
| 15 | =================================================================== |
| 16 | --- configure.orig |
| 17 | +++ configure |
| 18 | @@ -14809,7 +14809,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } |
| 19 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in |
| 20 | 10.0,*86*-darwin8*|10.0,*-darwin[91]*) |
| 21 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
| 22 | - 10.[012]*) |
| 23 | + 10.[012][,.]*) |
| 24 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; |
| 25 | 10.*) |
| 26 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |