From 42c8a2b5dd88dd922be63125fbc05aa73c75870b Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Nov 2016 06:07:55 +0000 Subject: configure.in: compressed debug section option * configure.in: make compressed debug section optional. [ruby-core:78121] [Bug #12934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index fea39e2986..bdfed91135 100644 --- a/configure.in +++ b/configure.in @@ -888,6 +888,11 @@ for n in infinity nan; do fi done +AC_ARG_WITH(compress-debug-sections, + AS_HELP_STRING([--with-compress-debug-sections=type], + [enable debug section compression]), + [compress_debug_sections=$withval], [compress_debug_sections=]) + if test "$GCC" = yes; then # NaCl's glibc build generates undefined references to __memset_chk. # TODO(sbc): Remove this once NaCl's glibc is fixed. @@ -917,11 +922,14 @@ if test "$GCC" = yes; then RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector) fi - RUBY_TRY_LDFLAGS(${linker_flag}--compress-debug-sections=zlib, - [compress_debug_sections=yes], + AS_CASE("${compress_debug_sections:-zlib}", + [none|no], [], [ + RUBY_TRY_LDFLAGS(${linker_flag}--compress-debug-sections=${compress_debug_sections:-zlib}, + [compress_debug_sections=${compress_debug_sections:-zlib}], [compress_debug_sections=no]) - if test "x$compress_debug_sections" = xyes; then - RUBY_APPEND_OPTION(DLDFLAGS, ${linker_flag}--compress-debug-sections=zlib) + ]) + if test "x$compress_debug_sections" != xno; then + RUBY_APPEND_OPTION(DLDFLAGS, ${linker_flag}--compress-debug-sections=$compress_debug_sections) fi AS_CASE(["$target_os"],[mingw*], [ -- cgit v1.2.3