[gcc-6] 273/401: * libphobos: Fix ARM32 multilib detection for system zlib.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:50:00 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 536d57a20a4872f810caac557315ebcc437eb362
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Fri Nov 18 12:22:33 2016 +0000

      * libphobos: Fix ARM32 multilib detection for system zlib.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9084 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                   |  5 +++--
 debian/patches/libphobos-zlib.diff | 41 ++++++++++++++++++++++++++++++--------
 2 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e9611f7..2a35498 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-gcc-6 (6.2.1-2) UNRELEASED; urgency=medium
+gcc-6 (6.2.1-2) unstable; urgency=medium
 
   * Add Replaces for renamed lib*gphobos-dev packages.
+  * libphobos: Fix ARM32 multilib detection for system zlib.
 
- -- Matthias Klose <doko at debian.org>  Thu, 17 Nov 2016 22:33:42 +0100
+ -- Matthias Klose <doko at debian.org>  Fri, 18 Nov 2016 11:39:12 +0100
 
 gcc-6 (6.2.1-1) unstable; urgency=medium
 
diff --git a/debian/patches/libphobos-zlib.diff b/debian/patches/libphobos-zlib.diff
index 4f1bd7f..2328599 100644
--- a/debian/patches/libphobos-zlib.diff
+++ b/debian/patches/libphobos-zlib.diff
@@ -16,18 +16,43 @@ Index: b/src/libphobos/m4/druntime/libraries.m4
 ===================================================================
 --- a/src/libphobos/m4/druntime/libraries.m4
 +++ b/src/libphobos/m4/druntime/libraries.m4
-@@ -28,5 +28,14 @@ AC_DEFUN([DRUNTIME_LIBRARIES_ZLIB],
+@@ -28,5 +28,39 @@ AC_DEFUN([DRUNTIME_LIBRARIES_ZLIB],
      AS_HELP_STRING([--with-system-zlib],
                     [use installed libz (default: no)]),
      [system_zlib=yes],[system_zlib=no])
-+  dnl no system zlib for cross builds
-+  if test x$cross_compiling = xyes; then
-+    system_zlib=no
-+  else
-+    dnl the system zlib might not be available for all multilibs
-+    if test x$system_zlib = xyes; then
-+      AC_CHECK_LIB([z],[gzopen],[:],[system_zlib=no])
++
++  AC_MSG_CHECKING([for system zlib])
++  save_LIBS=$LIBS
++  LIBS="$LIBS -lz"
++  dnl the link test is not good enough for ARM32 multilib detection,
++  dnl first check to link, then to run
++  AC_LINK_IFELSE(
++    [AC_LANG_PROGRAM([#include <zlib.h>],[gzopen("none", "rb")])],
++    [
++      AC_RUN_IFELSE([AC_LANG_SOURCE([[
++        #include <zlib.h>
++        int main() {
++          gzFile file = gzopen("none", "rb");
++          return 0;
++        }
++        ]])],
++        [system_zlib_found=yes],
++        [system_zlib_found=no],
++        dnl no system zlib for cross builds ...
++        [system_zlib_found=no]
++      )
++    ],
++    [system_zlib_found=no])
++  LIBS=$save_LIBS
++  if test x$system_zlib = xyes; then
++    if test x$system_zlib_found = xyes; then
++      AC_MSG_RESULT([found])
++    else
++      AC_MSG_RESULT([not found, disabled])
++      system_zlib=no
 +    fi
++  else
++    AC_MSG_RESULT([not enabled])
 +  fi
    AM_CONDITIONAL([DRUNTIME_ZLIB_SYSTEM], [test "$system_zlib" = yes])
  ])

-- 
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