From: Ximin Luo Date: Wed, 2 Nov 2016 03:04:49 +0000 (+0100) Subject: Default to PIC on arm, to fix failing armhf tests X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~97 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a5eeb899e34674f54af1de47c786f31f6f2c2e76;p=ocaml.git Default to PIC on arm, to fix failing armhf tests --- diff --git a/debian/changelog b/debian/changelog index fc030e7a..86998578 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ocaml (4.03.0-3) UNRELEASED; urgency=medium + + * Default to PIC on arm, to fix failing armhf tests. + + -- Ximin Luo 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 index 00000000..6f613c13 --- /dev/null +++ b/debian/patches/0010-arm-default-PIC.patch @@ -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 +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 diff --git a/debian/patches/series b/debian/patches/series index 2f5b2f10..c7d67535 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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