ruby-changes:50372
From: nobu <ko1@a...>
Date: Tue, 20 Feb 2018 11:37:35 +0900 (JST)
Subject: [ruby-changes:50372] nobu:r62488 (trunk): common.mk: moved macros to mjit_config.h
nobu 2018-02-20 11:37:28 +0900 (Tue, 20 Feb 2018) New Revision: 62488 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62488 Log: common.mk: moved macros to mjit_config.h * Makefile.in, common.mk, win32/Makefile.sub: moved MJIT macros to mjit_config.h from XCFLAGS. Modified files: trunk/Makefile.in trunk/common.mk trunk/mjit.c trunk/win32/Makefile.sub Index: common.mk =================================================================== --- common.mk (revision 62487) +++ common.mk (revision 62488) @@ -61,8 +61,6 @@ HTMLOUT = $(EXTOUT)/html https://github.com/ruby/ruby/blob/trunk/common.mk#L61 CAPIOUT = doc/capi MJIT_HEADER = rb_mjit_header.h MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/rb_mjit_min_header-$(RUBY_PROGRAM_VERSION).h -MJIT_CPPFLAGS = -DMJIT_HEADER_INSTALL_DIR=\""$(MJIT_HEADER_INSTALL_DIR)"\" \ - -DLIBRUBYARG_SHARED=\""$(LIBRUBYARG_SHARED)"\" MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch) INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT) Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 62487) +++ win32/Makefile.sub (revision 62488) @@ -1010,7 +1010,6 @@ s,@top_srcdir@,$(srcdir),;t t https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1010 s,@try_header@,try_compile,;t t s,@ruby_pc@,$(ruby_pc),;t t <<KEEP -XCFLAGS = $(XCFLAGS) $(MJIT_CPPFLAGS) miniruby: miniruby$(EXEEXT) @@ -1258,6 +1257,8 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1257 @echo making <<$@ #ifndef RUBY_MJIT_CONFIG_H #define RUBY_MJIT_CONFIG_H 1 + +#define MJIT_HEADER_INSTALL_DIR "$(MJIT_HEADER_INSTALL_DIR)" <<KEEP @ @(set sep=#define MJIT_CC_COMMON ) & \ @@ -1284,5 +1285,10 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1285 for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@ @echo /* MJIT_DLDFLAGS */>> $@ @ + @(set sep=#define MJIT_LIBS ) & \ + for %I in ($(LIBRUBYARG_SHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@ + @echo /* MJIT_LIBS */>> $@ + @ + @echo.>> $@ @echo #endif /* RUBY_MJIT_CONFIG_H */>> $@ @$(Q:@=: :) type $@ Index: Makefile.in =================================================================== --- Makefile.in (revision 62487) +++ Makefile.in (revision 62488) @@ -69,7 +69,7 @@ optflags = @optflags@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L69 debugflags = @debugflags@ warnflags = @warnflags@ @strict_warnflags@ cppflags = @cppflags@ -XCFLAGS = @XCFLAGS@ $(MJIT_CPPFLAGS) +XCFLAGS = @XCFLAGS@ CPPFLAGS = @CPPFLAGS@ $(INCFLAGS) MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@ MJIT_HEADER_SUFFIX = @@ -553,6 +553,8 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L553 echo '#ifndef RUBY_MJIT_CONFIG_H'; \ echo '#define RUBY_MJIT_CONFIG_H 1'; \ echo; \ + sep=; \ + quote MJIT_HEADER_INSTALL_DIR "$(MJIT_HEADER_INSTALL_DIR)"; \ sep=,; \ quote "MJIT_CC_COMMON " $(CC); \ quote "MJIT_CFLAGS " -w $(ARCH_FLAG); \ @@ -560,6 +562,7 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L562 quote "MJIT_DEBUGFLAGS " $(debugflags); \ quote "MJIT_LDSHARED " @LDSHARED@; \ quote "MJIT_DLDFLAGS " @DLDFLAGS@; \ + quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \ echo; \ echo '#endif /* RUBY_MJIT_CONFIG_H */'; \ } > $@ Index: mjit.c =================================================================== --- mjit.c (revision 62487) +++ mjit.c (revision 62488) @@ -647,7 +647,7 @@ compile_c_to_so(const char *c_file, cons https://github.com/ruby/ruby/blob/trunk/mjit.c#L647 const char *libs[] = { #ifdef _WIN32 # ifdef _MSC_VER - LIBRUBYARG_SHARED, + MJIT_LIBS "-link", libruby_installed, libruby_build, @@ -655,8 +655,7 @@ compile_c_to_so(const char *c_file, cons https://github.com/ruby/ruby/blob/trunk/mjit.c#L655 /* Look for ruby.dll.a in build and install directories. */ libruby_installed, libruby_build, - /* Link to ruby.dll.a, because Windows DLLs don't allow unresolved symbols. */ - LIBRUBYARG_SHARED, + MJIT_LIBS "-lmsvcrt", "-lgcc", # endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/