The following commit has been merged in the master branch:
commit 7944054cc835b5e3e73c856cfd701e988a410730
Author: Stephane Glondu <st...@glondu.net>
Date:   Thu Aug 11 10:33:53 2011 +0200

    Compile with -funwind-tables on ARM CPUs
    
    This fixes FTBFS on armel.
    
    See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637360#21

diff --git 
a/debian/patches/0001-Add-possibility-to-pass-flags-through-environment.patch 
b/debian/patches/0001-Add-possibility-to-pass-flags-through-environment.patch
new file mode 100644
index 0000000..eb79dcf
--- /dev/null
+++ 
b/debian/patches/0001-Add-possibility-to-pass-flags-through-environment.patch
@@ -0,0 +1,22 @@
+From: Stephane Glondu <st...@glondu.net>
+Date: Tue, 12 Jul 2011 18:32:51 +0200
+Subject: Add possibility to pass flags through environment
+
+Signed-off-by: Stephane Glondu <st...@glondu.net>
+---
+ myocamlbuild.ml |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/myocamlbuild.ml b/myocamlbuild.ml
+index 10b4d6a..4b34847 100644
+--- a/myocamlbuild.ml
++++ b/myocamlbuild.ml
+@@ -464,6 +464,7 @@ let package_default =
+                     OASISExpr.ETest ("ccomp_type", "cc")),
+                  S
+                    [
++                      (try Sh (Sys.getenv "CAML_EXTRA_FLAGS") with Not_found 
-> N);
+                       A "-ccopt";
+                       A "-std=c89";
+                       A "-ccopt";
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b963ecd
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Add-possibility-to-pass-flags-through-environment.patch
diff --git a/debian/rules b/debian/rules
index fd8c318..7d33fe5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,10 @@ export OCAMLFIND_DESTDIR
 OCAMLFIND_LDCONF=ignore
 export OCAMLFIND_LDCONF
 
+ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),arm)
+   export CAML_EXTRA_FLAGS=-ccopt -funwind-tables
+endif
+
 %:
        dh --with ocaml $@
 

-- 
ocaml-extunix packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to