aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2009-03-18 20:29:53 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2009-03-18 20:29:53 +0800
commit1fa84bebf358d4814a3da6d284d3906b87b703d7 (patch)
tree822292f5b0247edd27522094f5360b2abb819f52 /lang
parent72fd40a643084cdcf84c98d8a8bb2ffa52692338 (diff)
downloadfreebsd-ports-gnome-1fa84bebf358d4814a3da6d284d3906b87b703d7.tar.gz
freebsd-ports-gnome-1fa84bebf358d4814a3da6d284d3906b87b703d7.tar.zst
freebsd-ports-gnome-1fa84bebf358d4814a3da6d284d3906b87b703d7.zip
- Fix on CURRENT. The failure reason is that broken libphobos was produced, as the library used non-existing symbols from libc, namely tgammal, lgammal, erfcl, erfl, cbrtl, log1pl, expm1l. This somehow was not triggered before rev. 181074. So to fix this, add an extra patch to remove unimplemented math functions from libphobos.
Diffstat (limited to 'lang')
-rw-r--r--lang/gdc/Makefile4
-rw-r--r--lang/gdc/files/extra-patch-gcc-d-phobos-std-math.d76
2 files changed, 78 insertions, 2 deletions
diff --git a/lang/gdc/Makefile b/lang/gdc/Makefile
index e6578574cabc..cf2478b0e3a5 100644
--- a/lang/gdc/Makefile
+++ b/lang/gdc/Makefile
@@ -49,8 +49,8 @@ GDC_INC= ${PREFIX}/include/d/${GCC_VERSION}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 800000
-BROKEN= fails to link any executables on 8.x
+.if ${OSVERSION} >= 800041
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gcc-d-phobos-std-math.d
.endif
.ifndef TARGET_GCC
diff --git a/lang/gdc/files/extra-patch-gcc-d-phobos-std-math.d b/lang/gdc/files/extra-patch-gcc-d-phobos-std-math.d
new file mode 100644
index 000000000000..a0afce7c7080
--- /dev/null
+++ b/lang/gdc/files/extra-patch-gcc-d-phobos-std-math.d
@@ -0,0 +1,76 @@
+--- gcc/d/phobos/std/math.d.orig 2007-03-09 05:02:35.000000000 +0300
++++ gcc/d/phobos/std/math.d 2009-03-18 05:04:19.000000000 +0300
+@@ -638,8 +638,6 @@
+ * )
+ */
+
+-version (GNU_msvcrt_math) { /* nothing */ } else
+-real expm1(real x) { return std.c.math.expm1l(x); }
+
+
+ /*********************************************************************
+@@ -842,7 +840,6 @@
+ * )
+ */
+
+-real log1p(real x) { return std.c.math.log1pl(x); }
+
+ /***************************************
+ * Calculates the base-2 logarithm of x:
+@@ -922,7 +919,6 @@
+ * <tr> <td> &plusmn;&infin; <td> &plusmn;&infin; <td> no
+ * )
+ */
+-real cbrt(real x) { return std.c.math.cbrtl(x); }
+
+
+ /*******************************
+@@ -1066,16 +1062,12 @@
+ *
+ * <img src="erf.gif" alt="error function">
+ */
+-version (GNU_msvcrt_math) { /* nothing */ } else
+-real erf(real x) { return std.c.math.erfl(x); }
+
+ /**********************************
+ * Returns the complementary error function of x, which is 1 - erf(x).
+ *
+ * <img src="erfc.gif" alt="complementary error function">
+ */
+-version (GNU_msvcrt_math) { /* nothing */ } else
+-real erfc(real x) { return std.c.math.erfcl(x); }
+
+ /***********************************
+ * Natural logarithm of gamma function.
+@@ -1093,12 +1085,6 @@
+ * )
+ */
+ /* Documentation prepared by Don Clugston */
+-real lgamma(real x)
+-{
+- return std.c.math.lgammal(x);
+-
+- // Use etc.gamma.lgamma for those C systems that are missing it
+-}
+
+ /***********************************
+ * The Gamma function, $(GAMMA)(x)
+@@ -1125,18 +1111,6 @@
+ * $(LINK http://www.netlib.org/cephes/ldoubdoc.html#gamma)
+ */
+ /* Documentation prepared by Don Clugston */
+-version (GNU_Need_tgamma)
+-{
+- private import etc.gamma;
+- alias etc.gamma.tgamma tgamma;
+-}
+-else
+-real tgamma(real x)
+-{
+- return std.c.math.tgammal(x);
+-
+- // Use etc.gamma.tgamma for those C systems that are missing it
+-}
+
+ /**************************************
+ * Returns the value of x rounded upward to the next integer