ruby-changes:52117
From: k0kubun <ko1@a...>
Date: Mon, 13 Aug 2018 00:13:12 +0900 (JST)
Subject: [ruby-changes:52117] k0kubun:r64325 (trunk): configure.ac: MJIT_DLDFLAGS_NOCOMPRESS
k0kubun 2018-08-13 00:13:06 +0900 (Mon, 13 Aug 2018) New Revision: 64325 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64325 Log: configure.ac: MJIT_DLDFLAGS_NOCOMPRESS is configured now, to force -Wl,--compress-debug-sections=no for MJIT only when the option is used in MJIT_DLDFLAGS. This needs to be done in configure.ac to resolve build failure like https://travis-ci.org/ruby/ruby/builds/415120662. Makefile.in: define it in mjit_config.h mjit_worker.c: replace hard-coded flag to MJIT_DLDFLAGS_NOCOMPRESS Modified files: trunk/Makefile.in trunk/configure.ac trunk/mjit_worker.c Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 64324) +++ mjit_worker.c (revision 64325) @@ -266,7 +266,7 @@ static const char *const CC_LDSHARED_ARG https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L266 static const char *const CC_DLDFLAGS_ARGS[] = { MJIT_DLDFLAGS #ifdef USE_ELF /* force disable compression to get line number on addr2line.c */ - "-Wl,--compress-debug-sections=none", + MJIT_DLDFLAGS_NOCOMPRESS #endif #if defined __GNUC__ && !defined __clang__ "-nostartfiles", Index: Makefile.in =================================================================== --- Makefile.in (revision 64324) +++ Makefile.in (revision 64325) @@ -85,6 +85,7 @@ MJIT_OPTFLAGS = @MJIT_OPTFLAGS@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L85 MJIT_DEBUGFLAGS = @MJIT_DEBUGFLAGS@ MJIT_LDSHARED = @MJIT_LDSHARED@ MJIT_DLDFLAGS = @DLDFLAGS@ +MJIT_DLDFLAGS_NOCOMPRESS = @MJIT_DLDFLAGS_NOCOMPRESS@ MJIT_HEADER = rb_mjit_header.h MJIT_MIN_HEADER_NAME = rb_mjit_min_header-$(RUBY_PROGRAM_VERSION).h MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/$(MJIT_MIN_HEADER_NAME) @@ -612,6 +613,7 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L613 quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \ quote "MJIT_LDSHARED " $(MJIT_LDSHARED); \ quote "MJIT_DLDFLAGS $${need_mjit_archflag:+ MJIT_ARCHFLAG}" $(MJIT_DLDFLAGS); \ + quote "MJIT_DLDFLAGS_NOCOMPRESS " $(MJIT_DLDFLAGS_NOCOMPRESS); \ quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \ $${archs:+echo} $${archs:+'#if 0'}; \ for arch in $$archs; do \ Index: configure.ac =================================================================== --- configure.ac (revision 64324) +++ configure.ac (revision 64325) @@ -543,6 +543,7 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L543 ]) AS_IF([test "x$compress_debug_sections" != xno], [ RUBY_APPEND_OPTION(DLDFLAGS, ${linker_flag}--compress-debug-sections=$compress_debug_sections) + RUBY_APPEND_OPTION(MJIT_DLDFLAGS_NOCOMPRESS, ${linker_flag}--compress-debug-sections=no) ]) AS_CASE(["$target_os"],[mingw*], [ @@ -2470,6 +2471,7 @@ AC_SUBST(MJIT_CC, [${MJIT_CC-'$(CC)'}])d https://github.com/ruby/ruby/blob/trunk/configure.ac#L2471 AC_SUBST(MJIT_OPTFLAGS, [${MJIT_OPTFLAGS-'$(optflags)'}])dnl AC_SUBST(MJIT_DEBUGFLAGS, [${MJIT_DEBUGFLAGS-'$(debugflags)'}])dnl AC_SUBST(MJIT_LDSHARED)dnl +AC_SUBST(MJIT_DLDFLAGS_NOCOMPRESS)dnl AC_SUBST(STATIC)dnl AC_SUBST(CCDLFLAGS)dnl -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/