[cairo-commit] build/Makefile.win32.common src/Makefile.win32
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Oct 3 21:37:24 PDT 2008
build/Makefile.win32.common | 8 ++++++--
src/Makefile.win32 | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit e76432f7544d5b3b9157f09e18acc167d9ee90a3
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Oct 4 00:35:43 2008 -0400
[win32] Use -MDd and -LDd instead of -MD and -LD for debug build
As reported by Damian Frank:
"I ran into a hitch with the Makefile.win32 infrastructure. It uses -MD and
-LD when linking regardless of the config, but it should be using -MDd and
-LDd for the debug config. I believe both the Makefile.win32.common and
src/Makefile.win32 files include erroneous declarations. This produces
warnings at link time about a mismatch when linking against properly created
debug libs (for instance, I had a zlib built as "LIB ASM Debug" that linked
properly against the debug runtime).
This problem applies to pixman too; can you pass this along to the
maintainer?"
Would be delighted to if someone commits a fix to pixman reading this
commit message.
diff --git a/build/Makefile.win32.common b/build/Makefile.win32.common
index d00f554..2fa3255 100644
--- a/build/Makefile.win32.common
+++ b/build/Makefile.win32.common
@@ -13,9 +13,13 @@ CC := cl
LINK := link
ifeq ($(CFG),debug)
+MS_MDFLAGS := -MDd
+MS_LDFLAGS := -LDd
OPT := -Od -Zi
else
-OPT := -O2
+MS_MDFLAGS := -MD
+MS_LDFLAGS := -LD
+OPT := -MD -O2
endif
PIXMAN_CFLAGS := -I$(top_srcdir)/../pixman/pixman
@@ -30,7 +34,7 @@ else
CAIRO_LIBS += zdll.lib
endif
-DEFAULT_CFLAGS = -MD -nologo $(OPT)
+DEFAULT_CFLAGS = -nologo $(MS_MDFLAGS) $(OPT)
DEFAULT_CFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
DEFAULT_CFLAGS += -I. -I$(top_srcdir)
DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
diff --git a/src/Makefile.win32 b/src/Makefile.win32
index aa68989..ee58929 100644
--- a/src/Makefile.win32
+++ b/src/Makefile.win32
@@ -13,7 +13,7 @@ static: inform $(CFG)/cairo-static.lib
dynamic: inform $(CFG)/cairo.dll
$(CFG)/cairo.dll: $(OBJECTS)
- $(CC) -MD -LD -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) -link $(CAIRO_LIBS)
+ $(CC) $(MS_MDFLAGS) $(MS_LDFLAGS) -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) -link $(CAIRO_LIBS)
$(CFG)/cairo-static.lib: $(OBJECTS_STATIC)
lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS_STATIC)
More information about the cairo-commit
mailing list