ruby-changes:51981
From: k0kubun <ko1@a...>
Date: Sun, 5 Aug 2018 23:33:48 +0900 (JST)
Subject: [ruby-changes:51981] k0kubun:r64196 (trunk): mjit.c: use -Tc flag explicitly
k0kubun 2018-08-05 23:33:40 +0900 (Sun, 05 Aug 2018) New Revision: 64196 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64196 Log: mjit.c: use -Tc flag explicitly This option makes sure that the argument is C source file. Probably this is not needed, but since I'm debugging it, I want to exclude any failure possibility for now. Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 64195) +++ mjit.c (revision 64196) @@ -754,7 +754,12 @@ compile_c_to_so(const char *c_file, cons https://github.com/ruby/ruby/blob/trunk/mjit.c#L754 p = append_lit(p, ".obj"); *p = '\0'; - files[3] = c_file; + /* files[3] = "-Tc*.c" */ + files[3] = p = (char *)alloca(sizeof(char) * (rb_strlen_lit("-Tc") + strlen(c_file) + 1)); + p = append_lit(p, "-Tc"); + p = append_str2(p, c_file, strlen(c_file)); + *p = '\0'; + args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS, files, CC_LIBS, CC_DLDFLAGS_ARGS); if (args == NULL) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/