[142957] trunk/dports/devel/gmp

jeremyhu at macports.org jeremyhu at macports.org
Sat Dec 12 07:57:11 PST 2015


Revision: 142957
          https://trac.macports.org/changeset/142957
Author:   jeremyhu at macports.org
Date:     2015-11-28 21:47:28 -0800 (Sat, 28 Nov 2015)
Log Message:
-----------
gmp: Link with -no-undefined

I encountered an odd error on a Leopard VM where some libgmp symbols were
missing in the library.  Had the library been built with -no-undefined, the
issue would have been caught at link time.  Oddly, rebuilding (with
-no-undefined) resulted in the symbols being present.  I highly doubt that
the flag is the fix for the problem.  It's likely that toolchain changes
in the interim fixed the issue for me, but I'm adding the flag to protect
users from potentially hitting fallout from the same issue in the future.

Modified Paths:
--------------
    trunk/dports/devel/gmp/Portfile

Added Paths:
-----------
    trunk/dports/devel/gmp/files/patch-Makefile.in.diff

Modified: trunk/dports/devel/gmp/Portfile
===================================================================
--- trunk/dports/devel/gmp/Portfile	2015-11-29 05:14:38 UTC (rev 142956)
+++ trunk/dports/devel/gmp/Portfile	2015-11-29 05:47:28 UTC (rev 142957)
@@ -6,6 +6,7 @@
 
 name            gmp
 version         6.1.0
+revision        1
 categories      devel math
 license         LGPL-3+
 maintainers     mcalhoun openmaintainer
@@ -31,6 +32,9 @@
 use_bzip2       yes
 use_parallel_build yes
 
+patchfiles \
+    patch-Makefile.in.diff
+
 configure.args  --enable-cxx
 
 # Prevent precompiled binaries.

Added: trunk/dports/devel/gmp/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/devel/gmp/files/patch-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/devel/gmp/files/patch-Makefile.in.diff	2015-11-29 05:47:28 UTC (rev 142957)
@@ -0,0 +1,20 @@
+--- Makefile.in.orig	2015-11-01 10:19:56.000000000 -0500
++++ Makefile.in	2015-11-29 00:34:56.000000000 -0500
+@@ -756,7 +756,7 @@ libgmp_la_DEPENDENCIES = @TAL_OBJECT@		\
+ 
+ libgmp_la_LIBADD = $(libgmp_la_DEPENDENCIES)
+ libgmp_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMP_LDFLAGS) \
+-  -version-info $(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE)
++  -version-info $(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) -no-undefined
+ 
+ 
+ # We need at least one .cc file in $(libgmpxx_la_SOURCES) so automake will
+@@ -767,7 +767,7 @@ libgmpxx_la_SOURCES = cxx/dummy.cc
+ libgmpxx_la_DEPENDENCIES = $(CXX_OBJECTS) libgmp.la
+ libgmpxx_la_LIBADD = $(libgmpxx_la_DEPENDENCIES)
+ libgmpxx_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMPXX_LDFLAGS) \
+-  -version-info $(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE)
++  -version-info $(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) -no-undefined
+ 
+ all: $(BUILT_SOURCES) config.h
+ 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/2b2331aa/attachment-0001.html>


More information about the macports-changes mailing list