summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-03 05:09:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-03 05:09:32 +0000
commit3bc92b8eac9e507797140ca9db1df98d3995dc75 (patch)
tree63505a9d56b19fde9f2d0a70085722eabda35cef
parentfc2764e58c0265e5ba71909b9ed771ec381fa872 (diff)
mjit_config.h: MJIT_LDSHARED
* configure.in (MJIT_LDSHARED): define based on LDSHARED with replacing CC with MJIT_CC. * Makefile.in, win32/Makefile.sub (mjit_config.h): instead of the default LDSHARED, use MJIT_LDSHARED to link mjit shared objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--Makefile.in3
-rw-r--r--configure.ac3
-rw-r--r--win32/Makefile.sub5
3 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 3fd21ee..047f781 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,6 +78,7 @@ MJIT_HEADER_INSTALL_DIR = @MJIT_HEADER_INSTALL_DIR@
MJIT_CC = @MJIT_CC@
MJIT_OPTFLAGS = @MJIT_OPTFLAGS@
MJIT_DEBUGFLAGS = @MJIT_DEBUGFLAGS@
+MJIT_LDSHARED = @MJIT_LDSHARED@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
@@ -564,7 +565,7 @@ mjit_config.h:
quote "MJIT_CFLAGS " -w $(ARCH_FLAG); \
quote "MJIT_OPTFLAGS " $(MJIT_OPTFLAGS); \
quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \
- quote "MJIT_LDSHARED " @LDSHARED@; \
+ quote "MJIT_LDSHARED " $(MJIT_LDSHARED); \
quote "MJIT_DLDFLAGS " @DLDFLAGS@; \
quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \
echo; \
diff --git a/configure.ac b/configure.ac
index 733a0c9..f4c1688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2461,6 +2461,7 @@ AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl
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(STATIC)dnl
AC_SUBST(CCDLFLAGS)dnl
@@ -3431,6 +3432,8 @@ AS_IF([test "${universal_binary-no}" = yes ], [
[rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
])
+: ${MJIT_LDSHARED=`echo "$LDSHARED" | sed ['s|\$(LD)|'"${LD}"'|g;s|\$(CC)|$(MJIT_CC)|g']`}
+
MAINLIBS="$LIBS"
LIBS=$ORIG_LIBS
AS_IF([test -n "${LIBS}"], [
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 5c1090c..b35821d 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -310,6 +310,9 @@ MJIT_OPTFLAGS = $(OPTFLAGS)
!ifndef MJIT_DEBUGFLAGS
MJIT_DEBUGFLAGS = $(DEBUGFLAGS)
!endif
+!ifndef MJIT_LDSHARED
+MJIT_LDSHARED = $(MJITCC) -LD
+!endif
DLDFLAGS = $(LDFLAGS) -dll
MAINLIBS = $(LIBS)
@@ -1289,7 +1292,7 @@ mjit_config.h:
@echo /* MJIT_DEBUGFLAGS */>> $@
@
@(set sep=#define MJIT_LDSHARED ) & \
- for %I in ($(LDSHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
+ for %I in ($(MJIT_LDSHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
@echo /* MJIT_LDSHARED */>> $@
@
@(set sep=#define MJIT_DLDFLAGS ) & \