Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 67f8503145b2bcdd41905831d30e30d6af67eaf8 1 parent 7908560
Jim Grundy jim-grundy authored committed

Showing 2 changed files with 15 additions and 15 deletions. Show diff stats Hide diff stats

  1. +1 1  Makefile.in
  2. +14 14 Makefile.msvc
2  Makefile.in
@@ -206,7 +206,7 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.in Makefile.in
206 206 echo "let gcc = {" >>$@
207 207 $(EMUL) $(OBJDIR)/machdep-ml.exe >>$@
208 208 echo "}" >>$@
209   - if cl /D_MSVC $< /Fe$(OBJDIR)/machdep-ml.exe /Fo$(OBJDIR)/machdep-ml.obj ;then \
  209 + if cl -D_MSVC $< -Fe$(OBJDIR)/machdep-ml.exe -Fo$(OBJDIR)/machdep-ml.obj ;then \
210 210 echo "let hasMSVC = true" >>$@ ;\
211 211 echo "let msvc = {" >>$@ ;\
212 212 $(OBJDIR)/machdep-ml.exe >>$@ ;\
28 Makefile.msvc
@@ -3,37 +3,37 @@
3 3 #
4 4 COMPILERNAME=MSVC
5 5
6   -CC:=cl /nologo
  6 +CC:=cl -nologo
7 7 ifdef RELEASELIB
8 8 #matth: we need the frame pointer for CHECK_GETFRAME, so
9   -# use /Oy- to prevent that optimization.
10   - CFLAGS:=/DRELEASE /D_MSVC /Ox /Ob2 /G6 /Oy-
  9 +# use -Oy- to prevent that optimization.
  10 + CFLAGS:=-DRELEASE -D_MSVC -Ox -Ob2 -G6 -Oy-
11 11 else
12   - CFLAGS:=/D_DEBUG /D_MSVC /Zi /MLd
  12 + CFLAGS:=-D_DEBUG -D_MSVC -Zi -MLd
13 13 endif
14   -CONLY:=/c
  14 +CONLY:=-c
15 15
16   -OPT_O2:= /Ox /Ob2 /G6
  16 +OPT_O2:= -Ox -Ob2 -G6
17 17
18   -OBJOUT:=/Fo
  18 +OBJOUT:=-Fo
19 19 OBJEXT:=obj
20 20
21   -EXEOUT:=/Fe
  21 +EXEOUT:=-Fe
22 22 LIBEXT:=lib
23 23 LDEXT:=.exe
24 24
25   -DEF:=/D
26   -ASMONLY:=/Fa
27   -INC:=/I
  25 +DEF:=-D
  26 +ASMONLY:=-Fa
  27 +INC:=-I
28 28
29   -CPPSTART:=cl /Dx86_WIN32 /D_MSVC /E /TC /I./lib /DCCURED
  29 +CPPSTART:=cl -Dx86_WIN32 -D_MSVC -E -TC -I./lib -DCCURED
30 30 CPPOUT:= >%o
31   -CPP:=$(CPPSTART) /FI fixup.h %i $(CPPOUT)
  31 +CPP:=$(CPPSTART) -FI fixup.h %i $(CPPOUT)
32 32
33 33 PATCHECHO:=echo
34 34
35 35 AR:=lib
36   -LIBOUT:=/OUT:
  36 +LIBOUT:=-OUT:
37 37
38 38 # The system include files to be patched
39 39 PATCH_SYSINCLUDES:=stdio.h ctype.h string.h io.h stdarg.h crtdbg.h \

0 comments on commit 67f8503

Please sign in to comment.
Something went wrong with that request. Please try again.