Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 22794) +++ win32/Makefile.sub (working copy) @@ -99,7 +99,7 @@ !if $(MSC_VER) < 1400 OPTFLAGS = -O2b2xg- !else -OPTFLAGS = -O2b2xty- +OPTFLAGS = -O2 !endif !endif !if !defined(PLATFORM) @@ -157,14 +157,17 @@ !if !defined(COMPILERFLAG) COMPILERFLAG = -Zm600 !endif +!if !defined(WARNFLAGS) +WARNFLAGS = -w3 -wd4996 +!endif !if !defined(CFLAGS) -CFLAGS = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) $(COMPILERFLAG) +CFLAGS = -nologo $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) $(COMPILERFLAG) !endif !if !defined(CXXFLAGS) CXXFLAGS = $(CFLAGS) !endif !if !defined(LDFLAGS) -LDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf +LDFLAGS = -incremental:no -nologo -debug -opt:ref -opt:icf !endif !if !defined(XLDFLAGS) XLDFLAGS = -stack:$(STACK) @@ -542,7 +545,7 @@ s,@CPPFLAGS@,$(CPPFLAGS),;t t s,@CXXFLAGS@,$(CXXFLAGS),;t t s,@FFLAGS@,$(FFLAGS),;t t -s,@LDFLAGS@,,;t t +s,@LDFLAGS@,$(LDFLAGS),;t t s,@LIBS@,$(LIBS),;t t s,@exec_prefix@,$${prefix},;t t s,@prefix@,$(prefix),;t t @@ -633,7 +636,7 @@ s,@LIBPATHFLAG@, -libpath:"%s",;t t s,@RPATHFLAG@,,;t t s,@LIBARG@,%s.lib,;t t -s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t +s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t !if $(MSC_VER) >= 1400 s,@LINK_SO@,@$$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t @@ -669,7 +672,7 @@ miniruby$(EXEEXT): @echo. $(LIBS) - $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ $(LDFLAGS) + $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ -link $(LDFLAGS) @$(RM) miniruby.lib miniruby.exp miniruby.exe -v $(LDSHARED_1) @@ -681,7 +684,7 @@ !if "$(PROGRAM)" != "" $(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res $(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \ - $(OUTFLAG)$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS) + $(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS) $(LDSHARED_0) $(LDSHARED_1) $(LDSHARED_2) @@ -691,7 +694,7 @@ $(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \ $(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \ - $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows + -link $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows $(LDSHARED_0) $(LDSHARED_1) $(LDSHARED_2) @@ -707,7 +710,7 @@ @echo. $(DLDOBJS) @-$(PRE_LIBRUBY_UPDATE) $(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \ - $(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \ + $(RUBY_SO_NAME).res $(LIBS) -Fe$@ -link $(LDFLAGS) \ $(LIBRUBY_DLDFLAGS) @$(RM) dummy.lib dummy.exp $(LDSHARED_0) Index: win32/setup.mak =================================================================== --- win32/setup.mak (revision 22794) +++ win32/setup.mak (working copy) @@ -235,10 +235,16 @@ # RUBY_INSTALL_NAME = ruby # RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR) -# CFLAGS = -nologo -MD $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) +# RUNTIMEFLAG = -Md +# DEBUGFLAGS = -Zi +# WARNFLAGS = -W3 -wd4996 +# OPTFLAGS = -O2 +# PROCESSOR_FLAG = +# COMPILERFLAG = -Zm600 +# CFLAGS = -nologo $$(RUNTIMEFLAG) $$(DEBUGFLAGS) $$(WARNFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) $$(COMPILERFLAG) # CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\" # STACK = 0x2000000 -# LDFLAGS = $$(CFLAGS) -Fm +# LDFLAGS = -incremental:no -nologo -debug -opt:ref -opt:icf # XLDFLAGS = # RFLAGS = -r # EXTLIBS =