| Attached Files | ocaml-3.12.1-Build.patch [^] (3,261 bytes) 2012-01-14 18:30 [Show Content] [Hide Content]diff -Naur ocaml-3.12.1/config/Makefile.mingw ocaml-3.12.1.new/config/Makefile.mingw
--- ocaml-3.12.1/config/Makefile.mingw 2010-05-25 11:00:39.000000000 +0100
+++ ocaml-3.12.1.new/config/Makefile.mingw 2012-01-14 14:27:53.485141500 +0000
@@ -1,6 +1,6 @@
#########################################################################
# #
-# Objective Caml #
+# OCaml #
# #
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
# #
@@ -11,7 +11,7 @@
# #
#########################################################################
-# $Id: Makefile.mingw 10461 2010-05-25 10:00:39Z frisch $
+# $Id: Makefile.mingw 11319 2011-12-16 17:02:48Z xleroy $
# Configuration for Windows, Mingw compiler
@@ -37,6 +37,10 @@
########## Toolchain and OS dependencies
TOOLCHAIN=mingw
+
+### Toolchain prefix
+TOOLPREF=i686-w64-mingw32-
+
CCOMPTYPE=cc
O=o
A=a
@@ -61,10 +65,11 @@
MKSHAREDLIBRPATH=
NATIVECCPROFOPTS=
NATIVECCRPATH=
-ASM=as
+ASM=$(TOOLPREF)as
ASPP=gcc
ASPPPROFFLAGS=
PROFILING=noprof
+RUNTIMED=noruntimed
DYNLINKOPTS=
DEBUGGER=ocamldebugger
CC_PROFILE=
@@ -72,11 +77,12 @@
EXTRALIBS=
NATDYNLINK=true
CMXS=cmxs
+RUNTIMED=noruntimed
########## 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
@@ -103,16 +109,16 @@
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
@@ -135,7 +141,7 @@
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
diff -Naur ocaml-3.12.1/win32caml/Makefile ocaml-3.12.1.new/win32caml/Makefile
--- ocaml-3.12.1/win32caml/Makefile 2007-11-15 13:21:15.000000000 +0000
+++ ocaml-3.12.1.new/win32caml/Makefile 2012-01-14 14:28:33.843602500 +0000
@@ -40,7 +40,7 @@
rm -f ocaml.res
endif
ifeq ($(TOOLCHAIN),mingw)
- windres -i ocaml.rc -o $@
+ $(TOOLPREF)windres -i ocaml.rc -o $@
endif
$(OBJS): inria.h inriares.h history.h editbuffer.h
ocaml-3.12.1-PR5478.patch [^] (5,601 bytes) 2012-01-14 18:30 [Show Content] [Hide Content]diff -Naur ocaml-3.12.1/Makefile ocaml-3.12.1.new/Makefile
--- ocaml-3.12.1/Makefile 2010-06-16 02:32:26.000000000 +0100
+++ ocaml-3.12.1.new/Makefile 2012-01-14 16:56:47.827159500 +0000
@@ -382,6 +382,7 @@
-e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
-e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
-e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
+ -e 's|%%ARCMD%%|$(ARCMD)|' \
-e 's|%%CC_PROFILE%%|$(CC_PROFILE)|' \
-e 's|%%ARCH%%|$(ARCH)|' \
-e 's|%%MODEL%%|$(MODEL)|' \
diff -Naur ocaml-3.12.1/Makefile.nt ocaml-3.12.1.new/Makefile.nt
--- ocaml-3.12.1/Makefile.nt 2010-07-06 11:02:53.000000000 +0100
+++ ocaml-3.12.1.new/Makefile.nt 2012-01-14 16:56:38.934638700 +0000
@@ -323,6 +323,7 @@
-e "s|%%BYTECCLIBS%%|$(BYTECCLIBS)|" \
-e "s|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|" \
-e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
+ -e 's|%%ARCMD%%|$(ARCMD)|' \
-e 's|%%BINUTILS_NM%%|$(BINUTILS_NM)|' \
-e 's|%%BINUTILS_OBJCOPY%%|$(BINUTILS_OBJCOPY)|' \
-e "s|%%ARCH%%|$(ARCH)|" \
diff -Naur ocaml-3.12.1/config/Makefile-templ ocaml-3.12.1.new/config/Makefile-templ
--- ocaml-3.12.1/config/Makefile-templ 2010-01-22 12:48:24.000000000 +0000
+++ ocaml-3.12.1.new/config/Makefile-templ 2012-01-14 16:37:11.467525300 +0000
@@ -89,6 +89,7 @@
# If ranlib is not needed:
#RANLIB=ar rs
#RANLIBCMD=
+#ARCMD=ar
### Shared library support
# Extension for shared libraries: so if supported, a if not supported
diff -Naur ocaml-3.12.1/config/Makefile.mingw ocaml-3.12.1.new/config/Makefile.mingw
--- ocaml-3.12.1/config/Makefile.mingw 2012-01-14 17:17:13.270257600 +0000
+++ ocaml-3.12.1.new/config/Makefile.mingw 2012-01-14 16:37:21.732713900 +0000
@@ -119,6 +119,7 @@
### The ranlib command
RANLIB=$(TOOLPREF)ranlib
RANLIBCMD=$(TOOLPREF)ranlib
+ARCMD=$(TOOLPREF)ar
############# Configuration for the native-code compiler
diff -Naur ocaml-3.12.1/config/Makefile.msvc ocaml-3.12.1.new/config/Makefile.msvc
--- ocaml-3.12.1/config/Makefile.msvc 2010-07-07 13:04:32.000000000 +0100
+++ ocaml-3.12.1.new/config/Makefile.msvc 2012-01-14 16:37:33.060018200 +0000
@@ -113,6 +113,7 @@
### The ranlib command
RANLIB=echo
RANLIBCMD=
+ARCMD=
############# Configuration for the native-code compiler
diff -Naur ocaml-3.12.1/config/Makefile.msvc64 ocaml-3.12.1.new/config/Makefile.msvc64
--- ocaml-3.12.1/config/Makefile.msvc64 2010-07-07 13:04:32.000000000 +0100
+++ ocaml-3.12.1.new/config/Makefile.msvc64 2012-01-14 16:37:44.517521400 +0000
@@ -118,6 +118,7 @@
### The ranlib command
RANLIB=echo
RANLIBCMD=
+ARCMD=
############# Configuration for the native-code compiler
diff -Naur ocaml-3.12.1/configure ocaml-3.12.1.new/configure
--- ocaml-3.12.1/configure 2011-07-04 22:15:01.000000000 +0100
+++ ocaml-3.12.1.new/configure 2012-01-14 16:35:35.781844300 +0000
@@ -816,6 +816,9 @@
echo "RANLIBCMD=" >> Makefile
fi
+echo "ARCMD=ar" >> Makefile
+
+
# Do #! scripts work?
if (SHELL=/bin/sh; export SHELL; (./sharpbang || ./sharpbang2) >/dev/null); then
diff -Naur ocaml-3.12.1/myocamlbuild_config.mli ocaml-3.12.1.new/myocamlbuild_config.mli
--- ocaml-3.12.1/myocamlbuild_config.mli 2010-11-18 12:27:11.000000000 +0000
+++ ocaml-3.12.1.new/myocamlbuild_config.mli 2012-01-14 16:38:10.877791000 +0000
@@ -4,6 +4,7 @@
val manext : string
val ranlib : string
val ranlibcmd : string
+val arcmd : string
val sharpbangscripts : bool
val bng_arch : string
val bng_asm_level : string
diff -Naur ocaml-3.12.1/utils/ccomp.ml ocaml-3.12.1.new/utils/ccomp.ml
--- ocaml-3.12.1/utils/ccomp.ml 2010-04-28 13:09:32.000000000 +0100
+++ ocaml-3.12.1.new/utils/ccomp.ml 2012-01-14 16:40:07.916586800 +0000
@@ -74,8 +74,8 @@
quoted_archive (quote_files file_list))
| _ ->
let r1 =
- command(Printf.sprintf "ar rc %s %s"
- quoted_archive (quote_files file_list)) in
+ command(Printf.sprintf "%s rc %s %s"
+ Config.ar quoted_archive (quote_files file_list)) in
if r1 <> 0 || String.length Config.ranlib = 0
then r1
else command(Config.ranlib ^ " " ^ quoted_archive)
diff -Naur ocaml-3.12.1/utils/config.mlbuild ocaml-3.12.1.new/utils/config.mlbuild
--- ocaml-3.12.1/utils/config.mlbuild 2010-05-19 12:29:38.000000000 +0100
+++ ocaml-3.12.1.new/utils/config.mlbuild 2012-01-14 16:39:36.468544800 +0000
@@ -55,6 +55,7 @@
let native_c_libraries = C.nativecclibs
let native_pack_linker = C.packld
let ranlib = C.ranlibcmd
+let ar = C.arcmd
let cc_profile = C.cc_profile
let mkdll = C.mkdll
let mkexe = C.mkexe
diff -Naur ocaml-3.12.1/utils/config.mli ocaml-3.12.1.new/utils/config.mli
--- ocaml-3.12.1/utils/config.mli 2010-05-19 12:29:38.000000000 +0100
+++ ocaml-3.12.1.new/utils/config.mli 2012-01-14 16:39:19.242228800 +0000
@@ -47,6 +47,8 @@
(* The linker command line to build main programs as dlls. *)
val ranlib: string
(* Command to randomize a library, or "" if not needed *)
+val ar: string
+ (* Name of the ar command, or "" if not needed (MSVC) *)
val cc_profile : string
(* The command line option to the C compiler to enable profiling. *)
diff -Naur ocaml-3.12.1/utils/config.mlp ocaml-3.12.1.new/utils/config.mlp
--- ocaml-3.12.1/utils/config.mlp 2010-05-19 12:29:38.000000000 +0100
+++ ocaml-3.12.1.new/utils/config.mlp 2012-01-14 16:38:46.091585800 +0000
@@ -44,6 +44,7 @@
let native_c_libraries = "%%NATIVECCLIBS%%"
let native_pack_linker = "%%PACKLD%%"
let ranlib = "%%RANLIBCMD%%"
+let ar = "%%ARCMD%%"
let cc_profile = "%%CC_PROFILE%%"
let mkdll = "%%MKDLL%%"
let mkexe = "%%MKEXE%%"
|