1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-08-12 15:13:06 +00:00
parent a7775c4e07
commit 422f4e3e1b
3 changed files with 5 additions and 1 deletions

View file

@ -85,6 +85,7 @@ MJIT_OPTFLAGS = @MJIT_OPTFLAGS@
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:
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 \

View file

@ -543,6 +543,7 @@ AS_IF([test "$GCC" = yes], [
])
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)'}])dnl
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

View file

@ -266,7 +266,7 @@ static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL}
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",