ruby-changes:57407
From: Takashi <ko1@a...>
Date: Fri, 30 Aug 2019 22:36:03 +0900 (JST)
Subject: [ruby-changes:57407] Takashi Kokubun: b0a291f6f6 (master): Split CC_LINKER_ARGS from CC_DLDFLAGS_ARGS
https://git.ruby-lang.org/ruby.git/commit/?id=b0a291f6f6 From b0a291f6f6a5834fd84807eb48be906ade429871 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Fri, 30 Aug 2019 22:16:32 +0900 Subject: Split CC_LINKER_ARGS from CC_DLDFLAGS_ARGS to drop MJIT_DLDFLAGS from compile_c_to_o for OpenBSD failure https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd65/ruby-master/log/20190830T110008Z.fail.html.gz. 8c7f4e8f8b7f9e74195ea0eb51f39014fec342c0 did not work for i686-linux https://travis-ci.org/ruby/ruby/jobs/578808112. diff --git a/mjit_worker.c b/mjit_worker.c index 7bdc3c4..516dd87 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -268,8 +268,9 @@ static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL}; https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L268 static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL}; static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL}; -static const char *const CC_DLDFLAGS_ARGS[] = { - MJIT_DLDFLAGS +static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL}; +// `CC_LINKER_ARGS` are linker flags which must be passed to `-c` as well. +static const char *const CC_LINKER_ARGS[] = { #if defined __GNUC__ && !defined __clang__ && !defined(__OpenBSD__) "-nostartfiles", #endif @@ -792,7 +793,7 @@ compile_c_to_o(const char *c_file, const char *o_file) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L793 "-c", NULL }; - char **args = form_args(3, cc_common_args, CC_CODEFLAG_ARGS, files); + char **args = form_args(4, cc_common_args, CC_CODEFLAG_ARGS, files, CC_LINKER_ARGS); if (args == NULL) return false; @@ -816,8 +817,8 @@ link_o_to_so(const char **o_files, const char *so_file) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L817 NULL }; - char **args = form_args(6, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS, - options, o_files, CC_LIBS, CC_DLDFLAGS_ARGS); + char **args = form_args(7, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS, + options, o_files, CC_LIBS, CC_DLDFLAGS_ARGS, CC_LINKER_ARGS); if (args == NULL) return false; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/