From: Steve Hay Date: Wed, 5 Oct 2005 15:34:18 +0000 (+0000) Subject: Fix $Config{ccflags} for Win32 perls built with dmake X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb275e7208fde6cd3835f1057d07fa69e22b40a4;p=p5sagit%2Fp5-mst-13.2.git Fix $Config{ccflags} for Win32 perls built with dmake The nmake makefile (win32/Makefile) currently adds -nologo, $(STRPOOL) and -W3 to the ccflags in CFG_VARS, but the dmake makefile (win32/makefile.mk) doesn't. This means that extensions built with perls built with VC++ and dmake spit out damn M$ logo messages and use a lower warning level. The reason for the difference is probably that the dmake makefile supports multiple compilers. Therefore, put the extra ccflags into a new macro, and set it appropriately for each compiler. Add the new macro to the nmake makefile too for orthogonality. p4raw-id: //depot/perl@25694 --- diff --git a/win32/Makefile b/win32/Makefile index e66ef74..c4c41d8 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -443,7 +443,8 @@ LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib # we add LIBC here, since we may be using PerlCRT.dll LIBFILES = $(LIBBASEFILES) $(LIBC) -CFLAGS = -nologo $(STRPOOL) -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ +EXTRACFLAGS = -nologo $(STRPOOL) -W3 +CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ $(PCHFLAGS) $(OPTIMIZE) LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ -libpath:"$(INST_COREDIR)" \ @@ -864,7 +865,7 @@ CFG_VARS = \ "archname=$(ARCHNAME)" \ "cc=$(CC)" \ "ld=$(LINK32)" \ - "ccflags=-nologo $(STRPOOL) -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ + "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ "cf_email=$(EMAIL)" \ "d_crypt=$(D_CRYPT)" \ "d_mymalloc=$(PERL_MALLOC)" \ diff --git a/win32/makefile.mk b/win32/makefile.mk index a08afe1..c05b4a1 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -404,6 +404,7 @@ OPTIMIZE = -O2 -D_RTLDLL LINK_DBG = .ENDIF +EXTRACFLAGS = CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ $(PCHFLAGS) $(OPTIMIZE) LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \ @@ -460,6 +461,7 @@ OPTIMIZE = -s -O2 LINK_DBG = -s .ENDIF +EXTRACFLAGS = CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" OBJOUT_FLAG = -o @@ -552,7 +554,8 @@ LIBBASEFILES += odbc32.lib odbccp32.lib # we add LIBC here, since we may be using PerlCRT.dll LIBFILES = $(LIBBASEFILES) $(LIBC) -CFLAGS = -nologo $(STRPOOL) -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ +EXTRACFLAGS = -nologo $(STRPOOL) -W3 +CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ $(PCHFLAGS) $(OPTIMIZE) LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ -libpath:"$(INST_COREDIR)" \ @@ -903,7 +906,7 @@ CFG_VARS = \ archname=$(ARCHNAME) ~ \ cc=$(CC) ~ \ ld=$(LINK32) ~ \ - ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ + ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ cf_email=$(EMAIL) ~ \ d_crypt=$(D_CRYPT) ~ \ d_mymalloc=$(PERL_MALLOC) ~ \