Browse files

Fix MSVC build parameters for MSys

Invocations of MSVC cl compiler were using "/" as the option
switch rather than "-". This isn't needed - cl understands
"-" as well as "/". Not only is it not needed, but it is
not wanted because when invoking cl through the MSys bash
shell MSys will see the "/" and attempt to treat what
follows as a Unix style path that it will "kindly"
translate to a Windows style path before calling cl.

There are more instances of this issue in Perl scripts, but this
is enough to get Cil built, and I don't speak Perl.
  • Loading branch information...
1 parent 7908560 commit 67f8503145b2bcdd41905831d30e30d6af67eaf8 @jim-grundy jim-grundy committed with kerneis Jul 16, 2012
Showing with 15 additions and 15 deletions.
  1. +1 −1 Makefile.in
  2. +14 −14 Makefile.msvc
View
2 Makefile.in
@@ -206,7 +206,7 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.in Makefile.in
echo "let gcc = {" >>$@
$(EMUL) $(OBJDIR)/machdep-ml.exe >>$@
echo "}" >>$@
- if cl /D_MSVC $< /Fe$(OBJDIR)/machdep-ml.exe /Fo$(OBJDIR)/machdep-ml.obj ;then \
+ if cl -D_MSVC $< -Fe$(OBJDIR)/machdep-ml.exe -Fo$(OBJDIR)/machdep-ml.obj ;then \
echo "let hasMSVC = true" >>$@ ;\
echo "let msvc = {" >>$@ ;\
$(OBJDIR)/machdep-ml.exe >>$@ ;\
View
28 Makefile.msvc
@@ -3,37 +3,37 @@
#
COMPILERNAME=MSVC
-CC:=cl /nologo
+CC:=cl -nologo
ifdef RELEASELIB
#matth: we need the frame pointer for CHECK_GETFRAME, so
-# use /Oy- to prevent that optimization.
- CFLAGS:=/DRELEASE /D_MSVC /Ox /Ob2 /G6 /Oy-
+# use -Oy- to prevent that optimization.
+ CFLAGS:=-DRELEASE -D_MSVC -Ox -Ob2 -G6 -Oy-
else
- CFLAGS:=/D_DEBUG /D_MSVC /Zi /MLd
+ CFLAGS:=-D_DEBUG -D_MSVC -Zi -MLd
endif
-CONLY:=/c
+CONLY:=-c
-OPT_O2:= /Ox /Ob2 /G6
+OPT_O2:= -Ox -Ob2 -G6
-OBJOUT:=/Fo
+OBJOUT:=-Fo
OBJEXT:=obj
-EXEOUT:=/Fe
+EXEOUT:=-Fe
LIBEXT:=lib
LDEXT:=.exe
-DEF:=/D
-ASMONLY:=/Fa
-INC:=/I
+DEF:=-D
+ASMONLY:=-Fa
+INC:=-I
-CPPSTART:=cl /Dx86_WIN32 /D_MSVC /E /TC /I./lib /DCCURED
+CPPSTART:=cl -Dx86_WIN32 -D_MSVC -E -TC -I./lib -DCCURED
CPPOUT:= >%o
-CPP:=$(CPPSTART) /FI fixup.h %i $(CPPOUT)
+CPP:=$(CPPSTART) -FI fixup.h %i $(CPPOUT)
PATCHECHO:=echo
AR:=lib
-LIBOUT:=/OUT:
+LIBOUT:=-OUT:
# The system include files to be patched
PATCH_SYSINCLUDES:=stdio.h ctype.h string.h io.h stdarg.h crtdbg.h \

0 comments on commit 67f8503

Please sign in to comment.