From e09c14a05f7872178d725179331c4dc7a109aa87 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 5 Aug 2018 14:33:40 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- mjit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index efe35ee1af..fd856b30ef 100644 --- a/mjit.c +++ b/mjit.c @@ -754,7 +754,12 @@ compile_c_to_so(const char *c_file, const char *so_file) 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) -- cgit v1.2.3