Ticket #44596: 0001-gmp-Use-correct-symbol-lookup-on-Yosemite-44596.patch

File 0001-gmp-Use-correct-symbol-lookup-on-Yosemite-44596.patch, 2.6 KB (added by larryv (Lawrence Velázquez), 10 years ago)

Fix for GMP build on Yosemite

  • dports/devel/gmp/Portfile

    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 
    66
    77name            gmp
    88version         6.0.0
     9revision        1
    910categories      devel math
    1011license         LGPL-3+
    1112maintainers     mcalhoun openmaintainer
    use_parallel_build yes 
    3637# See https://gmplib.org/list-archives/gmp-announce/2014-March/000042.html
    3738distfiles ${name}-${version}a${extract.suffix}
    3839
     40patchfiles      yosemite-symbol-lookup.patch
     41
    3942configure.args  --enable-cxx
    4043
    4144# Prevent precompiled binaries.
  • new file dports/devel/gmp/files/yosemite-symbol-lookup.patch

    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
    - +  
     1Index: 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' ;;
     14Index: 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' ;;