summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk2
-rw-r--r--ruby-runner.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 340f0a9..287241e 100644
--- a/common.mk
+++ b/common.mk
@@ -834,7 +834,7 @@ $(PLATFORM_D):
@exit > $@
exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT)
- $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ $<
+ $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(LDFLAGS) $(OUTFLAG)$@ $< $(LIBS)
$(Q) $(POSTLINK)
$(Q) ./miniruby$(EXEEXT) \
-e 'prog, dest = ARGV; dest += "/ruby"' \
diff --git a/ruby-runner.c b/ruby-runner.c
index 99be4a0..b5a2e50 100644
--- a/ruby-runner.c
+++ b/ruby-runner.c
@@ -43,6 +43,10 @@ insert_env_path(const char *envname, const char *paths, size_t size, int prepend
setenv(envname, env, 1);
}
+/* force to link libm for fiddle test */
+#include <math.h>
+double (*const ruby_libm_func)(double) = log;
+
#define EXTOUT_DIR BUILDDIR"/"EXTOUT
int
main(int argc, char **argv)