/usr/src/gcc-5/debian/patches/gdc-libphobos-link.diff is in gcc-5-source 5.5.0-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # DP: gdc: Always link with -ldl when linking with -lgphobos.
--- a/src/gcc/d/d-spec.c
+++ b/src/gcc/d/d-spec.c
@@ -75,6 +75,10 @@
#define LIBDRUNTIME_PROFILE LIBDRUNTIME
#endif
+#ifndef DL_LIBRARY
+#define DL_LIBRARY "dl"
+#endif
+
void
lang_specific_driver (cl_decoded_option **in_decoded_options,
unsigned int *in_decoded_options_count,
@@ -494,6 +498,10 @@
CL_DRIVER, &new_decoded_options[j]);
added_libraries++;
j++;
+ generate_option (OPT_l, DL_LIBRARY, 1,
+ CL_DRIVER, &new_decoded_options[j]);
+ added_libraries++;
+ j++;
#ifdef HAVE_LD_STATIC_DYNAMIC
if (library > 1 && !static_link)
|