aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lang/gdc/Makefile2
-rw-r--r--lang/gdc/files/patch-gcc_d_d-spec.c31
2 files changed, 32 insertions, 1 deletions
diff --git a/lang/gdc/Makefile b/lang/gdc/Makefile
index 6e68a877ed60..9cb974f28487 100644
--- a/lang/gdc/Makefile
+++ b/lang/gdc/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gdc
PORTVERSION= 0.24
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GCC} \
${MASTER_SITE_SOURCEFORGE:S/%SUBDIR%/dgcc/g:S/$/:gdc/g}
diff --git a/lang/gdc/files/patch-gcc_d_d-spec.c b/lang/gdc/files/patch-gcc_d_d-spec.c
new file mode 100644
index 000000000000..7dbf489b5119
--- /dev/null
+++ b/lang/gdc/files/patch-gcc_d_d-spec.c
@@ -0,0 +1,31 @@
+--- gcc/d/d-spec.c.orig 2007-10-16 20:24:22.000000000 +0900
++++ gcc/d/d-spec.c 2007-10-16 20:29:07.000000000 +0900
+@@ -46,6 +46,10 @@
+ #define MATH_LIBRARY_PROFILE "-lm"
+ #endif
+
++#ifndef LIBSTDCXX
++#define LIBSTDCXX "-lstdc++"
++#endif
++
+ #ifndef LIBPHOBOS
+ #define LIBPHOBOS "-lgphobos"
+ #endif
+@@ -295,7 +299,7 @@
+ /* There is one extra argument added here for the runtime
+ library: -lgphobos. The -pthread argument is added by
+ setting need_pthreads. */
+- num_args = argc + added + need_math + shared_libgcc + (library > 0 ? 1 : 0) + 1;
++ num_args = argc + added + need_math + shared_libgcc + (library > 0 ? 2 : 0) + 1;
+ arglist = xmalloc (num_args * sizeof (char *));
+
+ i = 0;
+@@ -353,6 +357,8 @@
+ /* Add `-lstdc++' if we haven't already done so. */
+ if (library > 0)
+ {
++ arglist[j++] = LIBSTDCXX;
++ added_libraries++;
+ arglist[j++] = saw_profile_flag ? LIBPHOBOS_PROFILE : LIBPHOBOS;
+ added_libraries++;
+ need_pthreads = 1;