[gcc-6] 200/401: * gdc: Always link with -ldl when linking with -lgphobos. Closes: #835255, #835757. * Fix building D code with external C++ references.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:49:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit 6e1b557be983aed2bd679be0736b9aba3fd50f61
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sun Sep 4 12:14:58 2016 +0000

      * gdc: Always link with -ldl when linking with -lgphobos.
        Closes: #835255, #835757.
      * Fix building D code with external C++ references.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8965 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                         |  3 +++
 debian/patches/g++-multiarch-incdir.diff |  4 ++--
 debian/patches/gdc-libphobos-link.diff   | 26 ++++++++++++++++++++++++++
 debian/rules.patch                       |  3 ++-
 4 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f979264..1a51066 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ gcc-6 (6.2.0-3) unstable; urgency=medium
       PR tree-optimization/71077, PR tree-optimization/68542, PR fortran/77352,
       PR fortran/77374, PR fortran/71014, PR fortran/69281.
   * Fix setting the stage1 C++ compiler.
+  * gdc: Always link with -ldl when linking with -lgphobos.
+    Closes: #835255, #835757.
+  * Fix building D code with external C++ references.
 
  -- Matthias Klose <doko at debian.org>  Sun, 04 Sep 2016 12:38:47 +0200
 
diff --git a/debian/patches/g++-multiarch-incdir.diff b/debian/patches/g++-multiarch-incdir.diff
index ce27865..1583158 100644
--- a/debian/patches/g++-multiarch-incdir.diff
+++ b/debian/patches/g++-multiarch-incdir.diff
@@ -84,7 +84,7 @@ Index: b/src/gcc/incpath.c
  			}
  		      str = reconcat (str, str, dir_separator_str,
  				      imultiarch, NULL);
-+		      if (p->cplusplus)
++		      if (p->cplusplus && strstr (str, "/c++/"))
 +			{
 +			  char *suffix = strstr (str, "/c++/");
 +			  *suffix++ = '\0';
@@ -104,7 +104,7 @@ Index: b/src/gcc/incpath.c
  		  continue;
  		}
 -	      str = reconcat (str, str, dir_separator_str, imultiarch, NULL);
-+	      if (p->cplusplus)
++	      if (p->cplusplus && strstr (str, "/c++/"))
 +		{
 +		  char *suffix = strstr (str, "/c++/");
 +		  *suffix++ = '\0';
diff --git a/debian/patches/gdc-libphobos-link.diff b/debian/patches/gdc-libphobos-link.diff
new file mode 100644
index 0000000..8495796
--- /dev/null
+++ b/debian/patches/gdc-libphobos-link.diff
@@ -0,0 +1,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)
diff --git a/debian/rules.patch b/debian/rules.patch
index a9010b5..08ab572 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -182,7 +182,8 @@ ifeq ($(with_d),yes)
 	gdc-versym-os \
 	gdc-frontend-posix \
 	gdc-base-version \
-	gdc-profiledbuild
+	gdc-profiledbuild \
+	gdc-libphobos-link
 #	gdc-multiarch
   ifneq ($(GFDL_INVARIANT_FREE),yes)
     debian_patches += gdc-6-doc

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git



More information about the Reproducible-commits mailing list