Default to PIC on arm, to fix failing armhf tests
authorXimin Luo <infinity0@debian.org>
Wed, 2 Nov 2016 03:04:49 +0000 (04:04 +0100)
committerXimin Luo <infinity0@debian.org>
Wed, 2 Nov 2016 03:04:49 +0000 (04:04 +0100)
debian/changelog
debian/patches/0010-arm-default-PIC.patch [new file with mode: 0644]
debian/patches/series

index fc030e7a31498c87c305e69c8823beb4bb7a9578..86998578277756fa87e5a419e1df5209bc06998e 100644 (file)
@@ -1,3 +1,9 @@
+ocaml (4.03.0-3) UNRELEASED; urgency=medium
+
+  * Default to PIC on arm, to fix failing armhf tests.
+
+ -- Ximin Luo <infinity0@debian.org>  Wed, 02 Nov 2016 04:02:05 +0100
+
 ocaml (4.03.0-2) experimental; urgency=medium
 
   * Add native compilers for ppc64, ppc64el, s390x.
diff --git a/debian/patches/0010-arm-default-PIC.patch b/debian/patches/0010-arm-default-PIC.patch
new file mode 100644 (file)
index 0000000..6f613c1
--- /dev/null
@@ -0,0 +1,32 @@
+Description: Default to PIC on arm
+ Otherwise the armhf build fails now that PIE is enabled by default.
+ TODO: there might be a better way to do this.
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: TODO
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/utils/clflags.ml
++++ b/utils/clflags.ml
+@@ -146,6 +146,7 @@
+ let pic_code = ref (match Config.architecture with (* -fPIC *)
+                      | "amd64" -> true
++                     | "arm" -> true
+                      | _       -> false)
+ let runtime_variant = ref "";;      (* -runtime-variant *)
+--- a/man/ocamlopt.m
++++ b/man/ocamlopt.m
+@@ -682,10 +682,10 @@
+ Select the floating-point hardware
+ .TP
+ .B \-fPIC
+-Generate position-independent machine code.
++Generate position-independent machine code.  This is the default.
+ .TP
+ .B \-fno\-PIC
+-Generate position-dependent machine code.  This is the default.
++Generate position-dependent machine code.
+ .TP
+ .B \-fthumb
+ Enable Thumb/Thumb-2 code generation
index 2f5b2f10d3007318edd88523b795ce55e50cca17..c7d67535f8e0b7bd4019d521195e09d8b94273a6 100644 (file)
@@ -6,3 +6,4 @@
 0006-Embed-bytecode-in-C-object-when-using-custom.patch
 0008-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch
 0009-Skip-native-tests.patch
+0010-arm-default-PIC.patch