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

ruby-changes:44372

From: nobu <ko1@a...>
Date: Tue, 18 Oct 2016 16:36:51 +0900 (JST)
Subject: [ruby-changes:44372] nobu:r56445 (trunk): configure.in: compress debug sections

nobu	2016-10-18 16:36:42 +0900 (Tue, 18 Oct 2016)

  New Revision: 56445

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56445

  Log:
    configure.in: compress debug sections
    
    * configure.in (DLDFLAGS): append --compress-debug-sections=zlib
      if available, which reduces the size of LIBRUBY_SO by half or
      more.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 56444)
+++ configure.in	(revision 56445)
@@ -912,6 +912,13 @@ if test "$GCC" = yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L912
 	RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector)
     fi
 
+    RUBY_TRY_LDFLAGS(${linker_flag}--compress-debug-sections=zlib,
+		     [compress_debug_sections=yes],
+		     [compress_debug_sections=no])
+    if test "x$compress_debug_sections" = xyes; then
+	RUBY_APPEND_OPTION(DLDFLAGS, ${linker_flag}--compress-debug-sections=zlib)
+    fi
+
     AS_CASE(["$target_os"],[mingw*], [
       # On  Windows  platforms,   system  provided  headers  are  VC++
       # optimized.  That  is, C++  habits are often  contaminated into
@@ -3893,6 +3900,10 @@ AS_CASE("$enable_shared", [yes], [ https://github.com/ruby/ruby/blob/trunk/configure.in#L3900
     [mingw*|cygwin*|mswin*], [
 	LIBRUBY_RELATIVE=yes
 	])
+
+    if test "x$compress_debug_sections" = xyes; then
+	RUBY_APPEND_OPTION(LIBRUBY_DLDFLAGS, ${linker_flag}--compress-debug-sections=zlib)
+    fi
 ], [
   LIBRUBYARG_SHARED=
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 56444)
+++ ChangeLog	(revision 56445)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Oct 18 16:36:40 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in (DLDFLAGS): append --compress-debug-sections=zlib
+	  if available, which reduces the size of LIBRUBY_SO by half or
+	  more.
+
 Mon Oct 17 16:20:37 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* win32/configure.bat: add option to enable/disable to install

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

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