* 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
This commit is contained in:
usa 2003-12-18 12:48:43 +00:00
parent 77ffc8bf3f
commit b3b5b5e6b6
4 changed files with 43 additions and 26 deletions

View File

@ -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

3
eval.c
View File

@ -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;

View File

@ -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)

View File

@ -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)