ruby-changes:50509
From: nobu <ko1@a...>
Date: Sat, 3 Mar 2018 14:09:36 +0900 (JST)
Subject: [ruby-changes:50509] nobu:r62644 (trunk): mjit_config.h: MJIT_LDSHARED
nobu 2018-03-03 14:09:32 +0900 (Sat, 03 Mar 2018) New Revision: 62644 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62644 Log: 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. Modified files: trunk/Makefile.in trunk/configure.ac trunk/win32/Makefile.sub Index: configure.ac =================================================================== --- configure.ac (revision 62643) +++ configure.ac (revision 62644) @@ -2461,6 +2461,7 @@ AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl https://github.com/ruby/ruby/blob/trunk/configure.ac#L2461 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}" = y https://github.com/ruby/ruby/blob/trunk/configure.ac#L3432 [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}"], [ Index: Makefile.in =================================================================== --- Makefile.in (revision 62643) +++ Makefile.in (revision 62644) @@ -78,6 +78,7 @@ MJIT_HEADER_INSTALL_DIR = @MJIT_HEADER_I https://github.com/ruby/ruby/blob/trunk/Makefile.in#L78 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: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L565 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; \ Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 62643) +++ win32/Makefile.sub (revision 62644) @@ -310,6 +310,9 @@ MJIT_OPTFLAGS = $(OPTFLAGS) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L310 !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: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1292 @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 ) & \ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/