~ubuntu-branches/ubuntu/vivid/parmap/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0002-Set-OCAMLBEST-to-native-when-ocamlopt-is-present.patch

  • Committer: Package Import Robot
  • Author(s): Mehdi Dogguy
  • Date: 2014-10-09 10:05:08 UTC
  • Revision ID: package-import@ubuntu.com-20141009100508-vpdm391xiyr12xg4
Tags: 1.0~rc4-2
* Fix FTBFS on bytecode architectures.
  - Add patch 0002-Set-OCAMLBEST-to-native-when-ocamlopt-is-present.patch
    to be able to override OCAMLBEST from d/rules.
  - Set OCAMLBEST from /u/s/o/ocamlvars.mk in d/rules so that mips*, ppc64el
    and s390x are not considered as native architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Mehdi Dogguy <mehdi@debian.org>
 
2
Date: Thu, 9 Oct 2014 09:36:03 +0200
 
3
Subject: Set OCAMLBEST to native when ocamlopt is present
 
4
 
 
5
The goal of this patch is mainly to have an OCAMLBEST variable in the
 
6
Makefile that can be overriden externally when calling 'make'. This
 
7
can be useful to override upstream's choice on when we should consider
 
8
some architecture as a native architecture.
 
9
---
 
10
 Makefile.in |    9 ++-------
 
11
 configure   |    2 +-
 
12
 m4/ocaml.m4 |    2 +-
 
13
 3 files changed, 4 insertions(+), 9 deletions(-)
 
14
 
 
15
diff --git a/Makefile.in b/Makefile.in
 
16
index 7ae9cfd..3fda420 100644
 
17
--- a/Makefile.in
 
18
+++ b/Makefile.in
 
19
@@ -27,12 +27,7 @@ INSTALL = $(OCAMLFIND) install -destdir $(LIBDIR)
 
20
 UNINSTALL = $(OCAMLFIND) remove -destdir $(LIBDIR)
 
21
 endif
 
22
 
 
23
-
 
24
-ifeq ("@OCAMLBEST@","opt")
 
25
-  OCAMLBEST=native
 
26
-else
 
27
-  OCAMLBEST=byte
 
28
-endif
 
29
+OCAMLBEST ?= @OCAMLBEST@
 
30
 
 
31
 DIST_DIR = $(NAME)-$(VERSION)
 
32
 DIST_TARBALL = $(DIST_DIR).tar.gz
 
33
@@ -45,7 +40,7 @@ OPTLIBS=
 
34
 CMXSLIBS=
 
35
 ALIBS=
 
36
 
 
37
-ifeq ("@OCAMLBEST@","opt")
 
38
+ifeq ($(OCAMLBEST),native)
 
39
   OPTLIBS += $(BYTELIBS:%.cma=%.cmxa)
 
40
   CMXSLIBS += $(BYTELIBS:%.cma=%.cmxs)
 
41
 endif
 
42
diff --git a/configure b/configure
 
43
index 78a0825..a191063 100755
 
44
--- a/configure
 
45
+++ b/configure
 
46
@@ -2245,7 +2245,7 @@ $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2
 
47
 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
 
48
            OCAMLOPT=no
 
49
        else
 
50
-           OCAMLBEST=opt
 
51
+           OCAMLBEST=native
 
52
        fi
 
53
      fi
 
54
 
 
55
diff --git a/m4/ocaml.m4 b/m4/ocaml.m4
 
56
index e0eec61..98dc591 100644
 
57
--- a/m4/ocaml.m4
 
58
+++ b/m4/ocaml.m4
 
59
@@ -38,7 +38,7 @@ AC_DEFUN([AC_PROG_OCAML],
 
60
            AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])
 
61
            OCAMLOPT=no
 
62
        else
 
63
-           OCAMLBEST=opt
 
64
+           OCAMLBEST=native
 
65
        fi
 
66
      fi
 
67
 
 
68
--