blob: 05ab9d479173a7434bb8540acf55651c439d6236 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
Index: ocaml-3.10.0/Makefile
===================================================================
--- ocaml-3.10.0.orig/Makefile
+++ ocaml-3.10.0/Makefile
@@ -284,7 +284,7 @@ clean:: partialclean
ocamlc: $(COMPOBJS)
$(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS)
- @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \
+ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|g' \
driver/ocamlcomp.sh.in > ocamlcomp.sh
@chmod +x ocamlcomp.sh
@@ -295,7 +295,7 @@ partialclean::
ocamlopt: $(OPTOBJS)
$(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS)
- @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \
+ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|g' \
driver/ocamlcomp.sh.in > ocamlcompopt.sh
@chmod +x ocamlcompopt.sh
@@ -385,7 +385,7 @@ ocamlc.opt: $(COMPOBJS:.cmo=.cmx)
$(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \
$(COMPOBJS:.cmo=.cmx) \
asmrun/meta.o asmrun/dynlink.o -cclib "$(BYTECCLIBS)"
- @sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
+ @sed -e 's|@compiler@|$$topdir/ocamlc.opt|g' \
driver/ocamlcomp.sh.in > ocamlcomp.sh
@chmod +x ocamlcomp.sh
@@ -396,7 +396,7 @@ partialclean::
ocamlopt.opt: $(OPTOBJS:.cmo=.cmx)
$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt $(OPTOBJS:.cmo=.cmx)
- @sed -e 's|@compiler@|$$topdir/ocamlopt.opt|' \
+ @sed -e 's|@compiler@|$$topdir/ocamlopt.opt|g' \
driver/ocamlcomp.sh.in > ocamlcompopt.sh
@chmod +x ocamlcompopt.sh
Index: ocaml-3.10.0/driver/ocamlcomp.sh.in
===================================================================
--- ocaml-3.10.0.orig/driver/ocamlcomp.sh.in
+++ ocaml-3.10.0/driver/ocamlcomp.sh.in
@@ -2,4 +2,9 @@
topdir=`dirname $0`
+# evil hack for evil build system.
+if [ -x /usr/bin/scanelf ]; then
+ [ "$(scanelf @compiler@ -BF%x#f)" != "--mxe-" ] && scanelf -qXx -z mxe @compiler@ > /dev/null
+fi
+
exec @compiler@ -nostdlib -I $topdir/stdlib "$@"
|