--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Fri, 26 Jul 2013 06:13:27 +0200
+Subject: Fix code generation bug with "mod 1"
+
+Backport of a patch from Benedikt Meurer. ocamlnet needs it.
+
+Bug: http://caml.inria.fr/mantis/view.php?id=5910
+---
+ asmcomp/arm/selection.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/asmcomp/arm/selection.ml b/asmcomp/arm/selection.ml
+index ecda382..ef112ed 100644
+--- a/asmcomp/arm/selection.ml
++++ b/asmcomp/arm/selection.ml
+@@ -173,7 +173,7 @@ method! select_operation op args =
+ | (Cdivi, args) ->
+ (Iextcall("__aeabi_idiv", false), args)
+ | (Cmodi, [arg; Cconst_int n])
+- when n = 1 lsl Misc.log2 n ->
++ when n > 1 && n = 1 lsl Misc.log2 n ->
+ (Iintop_imm(Imod, n), [arg])
+ | (Cmodi, args) ->
+ (* See above for fix up of return register *)
+--
0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch
0007-Avoid-multiple-declarations-in-generated-.c-files-in.patch
0008-Embed-bytecode-in-C-object-when-using-custom.patch
+0009-Fix-code-generation-bug-with-mod-1.patch