summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2011-12-12 11:38:06 +0000
committerAlain Frisch <alain@frisch.fr>2011-12-12 11:38:06 +0000
commit5f8ff42f10fad6cde4552a64a16fb6992ca5b28c (patch)
tree63b3925ceb5aff5feba4050d64f89a7ec2fdce1f /config
parente707c415432728fe2219c8ff09a65dba264dc6c0 (diff)
downloadocaml-5f8ff42f10fad6cde4552a64a16fb6992ca5b28c.tar.gz
#5179: the 'official' 32-bit mingw compiler is now the one from the mingw-w64 project, packaged in Cygwin (as supported by flexdll 0.27).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11300 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'config')
-rw-r--r--config/Makefile.mingw18
1 files changed, 11 insertions, 7 deletions
diff --git a/config/Makefile.mingw b/config/Makefile.mingw
index 9e79bc954a..22da3c16b6 100644
--- a/config/Makefile.mingw
+++ b/config/Makefile.mingw
@@ -37,6 +37,10 @@ MANDIR=$(PREFIX)/man
########## Toolchain and OS dependencies
TOOLCHAIN=mingw
+
+### Toolchain prefix
+TOOLPREF=i686-w64-mingw32-
+
CCOMPTYPE=cc
O=o
A=a
@@ -61,7 +65,7 @@ SHAREDCCCOMPOPTS=
MKSHAREDLIBRPATH=
NATIVECCPROFOPTS=
NATIVECCRPATH=
-ASM=as
+ASM=$(TOOLPREF)as
ASPP=gcc
ASPPPROFFLAGS=
PROFILING=noprof
@@ -77,7 +81,7 @@ CMXS=cmxs
########## Configuration for the bytecode compiler
### Which C compiler to use for the bytecode interpreter.
-BYTECC=gcc -mno-cygwin
+BYTECC=$(TOOLPREF)gcc
### Additional compile-time options for $(BYTECC). (For static linking.)
BYTECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
@@ -104,16 +108,16 @@ MKEXE=$(FLEXLINK) -exe
MKMAINDLL=$(FLEXLINK) -maindll
### How to build a static library
-MKLIB=rm -f $(1); ar rcs $(1) $(2)
-#ml let mklib out files opts = Printf.sprintf "rm -f %s && ar rcs %s %s %s" out opts out files;;
+MKLIB=rm -f $(1); $(TOOLPREF)ar rc $(1) $(2); $(RANLIB) $(1)
+#ml let mklib out files opts = Printf.sprintf "rm -f %s && %sar rcs %s %s %s" out toolpref opts out files;;
### Canonicalize the name of a system library
SYSLIB=-l$(1)
#ml let syslib x = "-l"^x;;
### The ranlib command
-RANLIB=ranlib
-RANLIBCMD=ranlib
+RANLIB=$(TOOLPREF)ranlib
+RANLIBCMD=$(TOOLPREF)ranlib
############# Configuration for the native-code compiler
@@ -136,7 +140,7 @@ NATIVECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
NATIVECCLINKOPTS=
### Build partially-linked object file
-PACKLD=ld -r $(NATIVECCLINKOPTS) -o #there must be a space after this '-o'
+PACKLD=$(TOOLPREF)ld -r $(NATIVECCLINKOPTS) -o #there must be a space after this '-o'
############# Configuration for the contributed libraries