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
This commit is contained in:
nobu 2016-11-16 06:07:55 +00:00
Родитель 13969a2b5d
Коммит 708f1e74b7
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -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*], [