diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-18 12:48:43 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-18 12:48:43 +0000 |
commit | b3b5b5e6b600d52ed429cdcf19144e431ab17296 (patch) | |
tree | 63e0b84595985ad41c168a1bbfe1d3dd2f6e291f | |
parent | 77ffc8bf3fec9e5b0e5d34b765b2285d4cda2090 (diff) | |
download | ruby-b3b5b5e6b600d52ed429cdcf19144e431ab17296.tar.gz |
* eval.c (stack_extend): ignore inline optimization on VC7.
* win32/Makefile.sub (OS, RT): can override.
* win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none
option. based on Tietew's patch [ruby-dev:22289]
* lib/mkmf.rb (create_makefile): should remove deffile if it's
made by miniruby. based on nobu's patch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | lib/mkmf.rb | 43 | ||||
-rw-r--r-- | win32/Makefile.sub | 9 |
4 files changed, 43 insertions, 26 deletions
@@ -1,3 +1,17 @@ +Thu Dec 18 21:47:35 2003 NAKAMURA Usaku <usa@ruby-lang.org> + + * lib/mkmf.rb (create_makefile): should remove deffile if it's + made by miniruby. based on nobu's patch. + +Thu Dec 18 21:44:21 2003 NAKAMURA Usaku <usa@ruby-lang.org> + + * eval.c (stack_extend): ignore inline optimization on VC7. + + * win32/Makefile.sub (OS, RT): can override. + + * win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none + option. based on Tietew's patch [ruby-dev:22289] + Thu Dec 18 16:38:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never @@ -8466,6 +8466,9 @@ rb_thread_switch(n) NORETURN(static void rb_thread_restore_context _((rb_thread_t,int))); +# if _MSC_VER >= 1300 +__declspec(noinline) +# endif static void stack_extend(th, exit) rb_thread_t th; diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 080aa051b1..359a7418b1 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -797,30 +797,19 @@ def create_makefile(target, srcprefix = nil) target = nil if $objs == "" if target and EXPORT_PREFIX - origdef = target + '.def' - deffile = EXPORT_PREFIX + origdef - unless File.exist? deffile - if File.exist? File.join(srcdir, deffile) - deffile = File.join(srcdir, deffile) - elsif !EXPORT_PREFIX.empty? and File.exist?(origdef = File.join(srcdir, origdef)) - open(origdef) do |d| - open(deffile, 'wb') do |f| - d.each do |l| - f.print l - break if /^EXPORTS$/i =~ l - end - d.each do |l| - f.print l.sub(/\S/, EXPORT_PREFIX+'\&') - end - end - end - else - open(deffile, 'wb') do |f| - f.print "EXPORTS\n", EXPORT_PREFIX, "Init_", target, "\n" - end + if File.exist?(File.join(srcdir, target + '.def')) + deffile = "$(srcdir)/$(TARGET).def" + unless EXPORT_PREFIX.empty? + makedef = %{-pe "sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i"} end + else + makedef = %{-e "puts 'EXPORTS', '#{EXPORT_PREFIX}Init_$(TARGET)'"} + end + if makedef + $distcleanfiles << '$(DEFFILE)' + origdef = deffile + deffile = "$(TARGET)-$(arch).def" end - $distcleanfiles << deffile unless deffile == origdef end libpath = libpathflag(libpath) @@ -914,7 +903,11 @@ static: $(STATIC_LIB) end end - mfile.print "$(DLLIB): $(OBJS)\n\t" + if makedef + mfile.print "$(DLLIB): $(OBJS) $(DEFFILE)\n\t" + else + mfile.print "$(DLLIB): $(OBJS)\n\t" + end mfile.print "@-$(RM) $@\n\t" mfile.print "@-$(RM) $(TARGET).lib\n\t" if $mswin mfile.print LINK_SO, "\n\n" @@ -924,6 +917,10 @@ static: $(STATIC_LIB) mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true" end mfile.print "\n\n" + if makedef + mfile.print "$(DEFFILE): #{origdef}\n" + mfile.print "\t$(RUBY) #{makedef} #{origdef} > $@\n\n" + end depend = File.join(srcdir, "depend") if File.exist?(depend) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index e591386d1f..6e669aceda 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -66,8 +66,10 @@ DEBUGFLAGS = -Zi !if !defined(OPTFLAGS) OPTFLAGS = -O2b2xg- !endif +!if !defined(OS) || !defined(RT) OS = mswin32 RT = msvcrt +!endif !ifndef RUBY_SO_NAME RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR) @@ -91,8 +93,11 @@ CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) !if !defined(CPPFLAGS) CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing !endif +!if !defined(LDFLAGS) +LDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf +!endif !if !defined(XLDFLAGS) -XLDFLAGS = +XLDFLAGS = -stack:$(STACK) !endif !if !defined(RFLAGS) RFLAGS = -r @@ -108,9 +113,7 @@ CC = $(CC) -nologo LD = $(CC) LDSHARED = $(LD) -LD XCFLAGS = -DRUBY_EXPORT -LDFLAGS = -link -incremental:no -pdb:none DLDFLAGS = $(LDFLAGS) -dll -XLDFLAGS = -stack:$(STACK) SOLIBS = LIBRUBY_LDSHARED = $(LDSHARED) |