[前][次][番号順一覧][スレッド一覧]

ruby-changes:64093

From: Yusuke <ko1@a...>
Date: Fri, 11 Dec 2020 14:08:57 +0900 (JST)
Subject: [ruby-changes:64093] 8c5ec10038 (master): Link zlib always if available

https://git.ruby-lang.org/ruby.git/commit/?id=8c5ec10038

From 8c5ec10038a9bbc328eeb3756da207ba5976072d Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Fri, 11 Dec 2020 10:54:06 +0900
Subject: Link zlib always if available

Major Linux distribution packages including Debian, Ubuntu, and Fedora
use `--compress-debug-sections=no` to build ruby, and then extract and
compress debug symbols as separate files. However, the configure option
makes ruby not link zlib, thus the generated binary cannot uncompress
the compressed separate debug symbol files, and fails to show C level
backtrace when a critical error like segfault occurs.

This change makes ruby always link zlib if it is available so that it
can show C level backtrace correctly.

Related: Debian packages require https://github.com/ruby/ruby/pull/3627
to load debug symbol files.

diff --git a/configure.ac b/configure.ac
index 6c6d73f..1ab36e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2739,9 +2739,7 @@ AS_IF([test "$rb_cv_binary_elf" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L2739
   AC_CHECK_HEADERS([elf.h elf_abi.h])
   AS_IF([test $ac_cv_header_elf_h = yes -o $ac_cv_header_elf_abi_h = yes], [
     AC_LIBOBJ([addr2line])
-    AS_IF([test "x$compress_debug_sections" = xzlib], [
-      AC_CHECK_LIB([z], [uncompress])
-    ])
+    AC_CHECK_LIB([z], [uncompress])
   ])
 ])
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]