From b562129589d54578e692950ba6a4af371522b92e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 13 Sep 2017 21:07:17 +0100 Subject: [PATCH] Add final upstream fix for aarch64/binutils relocation problems. https://github.com/ocaml/ocaml/pull/1330 --- ...-compatibility-breaking-change-items.patch | 2 +- ...metable-not-8-aligned-on-x86-64-port.patch | 2 +- 0003-Fixes-for-out-of-range-Ialloc.patch | 2 +- 0004-Don-t-add-rpaths-to-libraries.patch | 2 +- ...amlplugininfo-Useful-utilities-from-.patch | 2 +- ...-Allow-user-defined-C-compiler-flags.patch | 2 +- 0007-Adapt-config.guess-for-RISC-V.patch | 2 +- 0008-Add-RISC-V-backend-runtime.patch | 2 +- ...y-fix-for-andi-ori-xori-immediates-1.patch | 2 +- ...tes-range-when-adjusting-indexing-sp.patch | 2 +- 0011-Another-immediate-range-fix.patch | 2 +- 0012-AArch64-GOT-fixed.patch | 98 ++++++++++ ...bols-as-.hidden-in-arm64-codegen-pos.patch | 67 ------- ...-hidden-alias-for-each-global-symbol.patch | 172 ------------------ ocaml.spec | 14 +- 15 files changed, 116 insertions(+), 257 deletions(-) create mode 100644 0012-AArch64-GOT-fixed.patch delete mode 100644 0012-Mark-certain-symbols-as-.hidden-in-arm64-codegen-pos.patch delete mode 100644 0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch diff --git a/0001-Changes-clarify-compatibility-breaking-change-items.patch b/0001-Changes-clarify-compatibility-breaking-change-items.patch index 3660f4c..a0f93d3 100644 --- a/0001-Changes-clarify-compatibility-breaking-change-items.patch +++ b/0001-Changes-clarify-compatibility-breaking-change-items.patch @@ -32,5 +32,5 @@ index cc59f635e..10642f19d 100644 OCaml 4.04.2 (23 Jun 2017): -- -2.14.0 +2.13.2 diff --git a/0002-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch b/0002-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch index 42d88bf..0fa4fda 100644 --- a/0002-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch +++ b/0002-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch @@ -40,5 +40,5 @@ index c3f8692a8..75a785f74 100644 let setcnt = ref 0 in -- -2.14.0 +2.13.2 diff --git a/0003-Fixes-for-out-of-range-Ialloc.patch b/0003-Fixes-for-out-of-range-Ialloc.patch index 45e490b..2cba417 100644 --- a/0003-Fixes-for-out-of-range-Ialloc.patch +++ b/0003-Fixes-for-out-of-range-Ialloc.patch @@ -405,5 +405,5 @@ index 000000000..6e374c16e +0 +All tests succeeded. -- -2.14.0 +2.13.2 diff --git a/0004-Don-t-add-rpaths-to-libraries.patch b/0004-Don-t-add-rpaths-to-libraries.patch index d77cf9d..6ce11dc 100644 --- a/0004-Don-t-add-rpaths-to-libraries.patch +++ b/0004-Don-t-add-rpaths-to-libraries.patch @@ -25,5 +25,5 @@ index 9a8cf652b..269aa18e6 100644 sed -n -e 's/^#ml //p' ../config/Makefile) \ > ocamlmklibconfig.ml -- -2.14.0 +2.13.2 diff --git a/0005-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch b/0005-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch index 5699a91..868db9a 100644 --- a/0005-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch +++ b/0005-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch @@ -236,5 +236,5 @@ index 000000000..e28800f31 + header.units + end -- -2.14.0 +2.13.2 diff --git a/0006-configure-Allow-user-defined-C-compiler-flags.patch b/0006-configure-Allow-user-defined-C-compiler-flags.patch index 45f9aed..c8f9333 100644 --- a/0006-configure-Allow-user-defined-C-compiler-flags.patch +++ b/0006-configure-Allow-user-defined-C-compiler-flags.patch @@ -23,5 +23,5 @@ index e79659954..786f4cdbe 100755 cclibs="$cclibs $mathlib" -- -2.14.0 +2.13.2 diff --git a/0007-Adapt-config.guess-for-RISC-V.patch b/0007-Adapt-config.guess-for-RISC-V.patch index 926de7d..7611b72 100644 --- a/0007-Adapt-config.guess-for-RISC-V.patch +++ b/0007-Adapt-config.guess-for-RISC-V.patch @@ -31,5 +31,5 @@ index b79252d6b..8335398b2 100755 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; -- -2.14.0 +2.13.2 diff --git a/0008-Add-RISC-V-backend-runtime.patch b/0008-Add-RISC-V-backend-runtime.patch index 3abe853..9a8e815 100644 --- a/0008-Add-RISC-V-backend-runtime.patch +++ b/0008-Add-RISC-V-backend-runtime.patch @@ -1713,5 +1713,5 @@ index 786f4cdbe..b88dab26b 100755 case "$ccfamily" in clang-*) -- -2.14.0 +2.13.2 diff --git a/0009-Try-fix-for-andi-ori-xori-immediates-1.patch b/0009-Try-fix-for-andi-ori-xori-immediates-1.patch index 049fe96..688970c 100644 --- a/0009-Try-fix-for-andi-ori-xori-immediates-1.patch +++ b/0009-Try-fix-for-andi-ori-xori-immediates-1.patch @@ -39,5 +39,5 @@ index 60ec5cb4e..ad2b26e9b 100644 method! select_condition = function -- -2.14.0 +2.13.2 diff --git a/0010-Fix-immediates-range-when-adjusting-indexing-sp.patch b/0010-Fix-immediates-range-when-adjusting-indexing-sp.patch index d3f3358..9ba6686 100644 --- a/0010-Fix-immediates-range-when-adjusting-indexing-sp.patch +++ b/0010-Fix-immediates-range-when-adjusting-indexing-sp.patch @@ -152,5 +152,5 @@ index ad2b26e9b..283233679 100644 method select_addressing _ = function | Cop(Cadda, [arg; Cconst_int n]) when self#is_immediate n -> -- -2.14.0 +2.13.2 diff --git a/0011-Another-immediate-range-fix.patch b/0011-Another-immediate-range-fix.patch index a77684c..2e2ab86 100644 --- a/0011-Another-immediate-range-fix.patch +++ b/0011-Another-immediate-range-fix.patch @@ -127,5 +127,5 @@ index 97c49ce80..6cc190864 100644 emit_all fundecl.fun_body; List.iter emit_call_gc !call_gc_sites; -- -2.14.0 +2.13.2 diff --git a/0012-AArch64-GOT-fixed.patch b/0012-AArch64-GOT-fixed.patch new file mode 100644 index 0000000..a8a5bcd --- /dev/null +++ b/0012-AArch64-GOT-fixed.patch @@ -0,0 +1,98 @@ +From c428a156b8e659a884d4867e52c49534125dc72f Mon Sep 17 00:00:00 2001 +From: Mark Shinwell +Date: Wed, 13 Sep 2017 10:23:16 +0100 +Subject: [PATCH 12/12] AArch64 GOT fixed + +--- + Changes | 4 ++++ + asmcomp/arm64/emit.mlp | 15 +++++++++++++-- + asmcomp/arm64/selection.ml | 4 ++-- + 3 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/Changes b/Changes +index e8dbd42e2..b84a1f30e 100644 +--- a/Changes ++++ b/Changes +@@ -150,6 +150,10 @@ OCaml 4.05.0 (13 Jul 2017): + (Hannes Mehnert, Guillaume Bury, + review by Daniel Bünzli, Gabriel Scherer, Damien Doligez) + ++- GPR#1330: when generating dynamically-linkable code on AArch64, always ++ reference symbols (even locally-defined ones) through the GOT. ++ (Mark Shinwell, review by Xavier Leroy) ++ + ### Standard library: + + - MPR#6975, GPR#902: Truncate function added to stdlib Buffer module +diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp +index f75646e12..729096c57 100644 +--- a/asmcomp/arm64/emit.mlp ++++ b/asmcomp/arm64/emit.mlp +@@ -114,6 +114,7 @@ let emit_addressing addr r = + | Iindexed ofs -> + `[{emit_reg r}, #{emit_int ofs}]` + | Ibased(s, ofs) -> ++ assert (not !Clflags.dlcode); (* see selection.ml *) + `[{emit_reg r}, #:lo12:{emit_symbol_offset s ofs}]` + + (* Record live pointers at call points *) +@@ -323,7 +324,7 @@ let emit_literals() = + (* Emit code to load the address of a symbol *) + + let emit_load_symbol_addr dst s = +- if (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit s then begin ++ if not !Clflags.dlcode then begin + ` adrp {emit_reg dst}, {emit_symbol s}\n`; + ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol s}\n` + end else begin +@@ -609,6 +610,7 @@ let emit_instr i = + match addr with + | Iindexed _ -> i.arg.(0) + | Ibased(s, ofs) -> ++ assert (not !Clflags.dlcode); (* see selection.ml *) + ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; + reg_tmp1 in + begin match size with +@@ -636,6 +638,7 @@ let emit_instr i = + match addr with + | Iindexed _ -> i.arg.(1) + | Ibased(s, ofs) -> ++ assert (not !Clflags.dlcode); + ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; + reg_tmp1 in + begin match size with +@@ -924,7 +927,15 @@ let fundecl fundecl = + + let emit_item = function + | Cglobal_symbol s -> ` .globl {emit_symbol s}\n`; +- | Cdefine_symbol s -> `{emit_symbol s}:\n` ++ | Cdefine_symbol s -> ++ if !Clflags.dlcode then begin ++ (* GOT relocations against non-global symbols don't seem to work ++ properly: GOT entries are not created for the symbols and the ++ relocations evaluate to random other GOT entries. For the moment ++ force all symbols to be global. *) ++ ` .globl {emit_symbol s}\n`; ++ end; ++ `{emit_symbol s}:\n` + | Cint8 n -> ` .byte {emit_int n}\n` + | Cint16 n -> ` .short {emit_int n}\n` + | Cint32 n -> ` .long {emit_nativeint n}\n` +diff --git a/asmcomp/arm64/selection.ml b/asmcomp/arm64/selection.ml +index d8ea7f83b..b714d0032 100644 +--- a/asmcomp/arm64/selection.ml ++++ b/asmcomp/arm64/selection.ml +@@ -82,8 +82,8 @@ let inline_ops = + [ "sqrt"; "caml_bswap16_direct"; "caml_int32_direct_bswap"; + "caml_int64_direct_bswap"; "caml_nativeint_direct_bswap" ] + +-let use_direct_addressing symb = +- (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit symb ++let use_direct_addressing _symb = ++ not !Clflags.dlcode + + (* Instruction selection *) + +-- +2.13.2 + diff --git a/0012-Mark-certain-symbols-as-.hidden-in-arm64-codegen-pos.patch b/0012-Mark-certain-symbols-as-.hidden-in-arm64-codegen-pos.patch deleted file mode 100644 index 76d1b6d..0000000 --- a/0012-Mark-certain-symbols-as-.hidden-in-arm64-codegen-pos.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 2cc11dbf4e046610e85e66139f0d1ffc9e1cff65 Mon Sep 17 00:00:00 2001 -From: Jiong Wang -Date: Fri, 28 Jul 2017 19:00:00 +0200 -Subject: [PATCH 12/12] Mark certain symbols as .hidden in arm64 codegen, - possibly fixes MPR#7585 - -binutils 2.29 arm64 linker is more strict about when to perform pc-relative -relocations for global symbols. Specifically, they must be marked as .hidden. -ocaml arm64 codegen does not do this, so tests/lib-dynlink-native/ fails as -some symbols were not relocated. This patch fixes that by marking (hopefully) -the appropriate symbols as .hidden. ---- - asmcomp/arm64/emit.mlp | 4 ++++ - asmcomp/compilenv.ml | 1 - - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp -index f75646e12..ee72c114f 100644 ---- a/asmcomp/arm64/emit.mlp -+++ b/asmcomp/arm64/emit.mlp -@@ -324,6 +324,7 @@ let emit_literals() = - - let emit_load_symbol_addr dst s = - if (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit s then begin -+ ` .hidden {emit_symbol s}\n`; - ` adrp {emit_reg dst}, {emit_symbol s}\n`; - ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol s}\n` - end else begin -@@ -575,6 +576,7 @@ let emit_instr i = - ` fmov {emit_reg i.res.(0)}, #{emit_printf "0x%Lx" f}\n` - else begin - let lbl = float_literal f in -+ ` .hidden {emit_label lbl}\n`; - ` adrp {emit_reg reg_tmp1}, {emit_label lbl}\n`; - ` ldr {emit_reg i.res.(0)}, [{emit_reg reg_tmp1}, #:lo12:{emit_label lbl}]\n` - end -@@ -609,6 +611,7 @@ let emit_instr i = - match addr with - | Iindexed _ -> i.arg.(0) - | Ibased(s, ofs) -> -+ ` .hidden {emit_symbol s}\n`; - ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; - reg_tmp1 in - begin match size with -@@ -636,6 +639,7 @@ let emit_instr i = - match addr with - | Iindexed _ -> i.arg.(1) - | Ibased(s, ofs) -> -+ ` .hidden {emit_symbol s}\n`; - ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; - reg_tmp1 in - begin match size with -diff --git a/asmcomp/compilenv.ml b/asmcomp/compilenv.ml -index a50c57f45..32f8bf1da 100644 ---- a/asmcomp/compilenv.ml -+++ b/asmcomp/compilenv.ml -@@ -161,7 +161,6 @@ let make_symbol ?(unitname = current_unit.ui_symbol) idopt = - - let symbol_in_current_unit name = - let prefix = "caml" ^ current_unit.ui_symbol in -- name = prefix || - (let lp = String.length prefix in - String.length name >= 2 + lp - && String.sub name 0 lp = prefix --- -2.13.1 - diff --git a/0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch b/0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch deleted file mode 100644 index 2c527b6..0000000 --- a/0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch +++ /dev/null @@ -1,172 +0,0 @@ -From e7fdaf008e047c445fd7a6acf9362d8b5940bf4b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 5 Sep 2017 16:28:56 +0100 -Subject: [PATCH 12/12] arm64: Emit hidden alias for each global symbol. - -MPR#7585 -PR#1268 - -binutils 2.29 arm64 linker is more strict about when to perform -pc-relative relocations for global symbols. Specifically, they must be -marked as .hidden. ocaml arm64 codegen does not do this, so -tests/lib-dynlink-native/ fails as some symbols were not relocated. - -This patch fixes that by emitting a hidden alias for each global -symbol and using the hidden alias in (non-GOT) adrp instructions. - -The aliases appear in the asm output as: - - .L1234: - .hidden .L1234$hidden - .set .L1234$hidden,.L1234 - - camlFoo__bar: - .hidden camlFoo__bar$hidden - .set camlFoo__bar$hidden,camlFoo__bar ---- - asmcomp/arm64/emit.mlp | 52 ++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 38 insertions(+), 14 deletions(-) - -diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp -index f75646e12..01f5dddef 100644 ---- a/asmcomp/arm64/emit.mlp -+++ b/asmcomp/arm64/emit.mlp -@@ -49,6 +49,16 @@ let emit_label lbl = - let emit_symbol s = - Emitaux.emit_symbol '$' s - -+(* Every global label and symbol has a hidden equivalent (alias). -+ * See: https://github.com/ocaml/ocaml/pull/1268 -+ *) -+ -+let emit_label_hidden lbl = -+ emit_string ".L"; emit_int lbl; emit_string "$hidden" -+ -+let emit_symbol_hidden s = -+ Emitaux.emit_symbol '$' s; emit_string "$hidden" -+ - (* Output a pseudo-register *) - - let emit_reg = function -@@ -103,8 +113,8 @@ let emit_stack r = - - (* Output an addressing mode *) - --let emit_symbol_offset s ofs = -- emit_symbol s; -+let emit_symbol_hidden_offset s ofs = -+ emit_symbol_hidden s; - if ofs > 0 then `+{emit_int ofs}` - else if ofs < 0 then `-{emit_int (-ofs)}` - else () -@@ -114,7 +124,7 @@ let emit_addressing addr r = - | Iindexed ofs -> - `[{emit_reg r}, #{emit_int ofs}]` - | Ibased(s, ofs) -> -- `[{emit_reg r}, #:lo12:{emit_symbol_offset s ofs}]` -+ `[{emit_reg r}, #:lo12:{emit_symbol_hidden_offset s ofs}]` - - (* Record live pointers at call points *) - -@@ -315,7 +325,10 @@ let emit_literals() = - ` .align 3\n`; - List.iter - (fun (f, lbl) -> -- `{emit_label lbl}:`; emit_float64_directive ".quad" f) -+ `{emit_label lbl}:\n`; -+ ` .hidden {emit_label_hidden lbl}\n`; -+ ` .set {emit_label_hidden lbl},{emit_label lbl}\n`; -+ ` `; emit_float64_directive ".quad" f) - !float_literals; - float_literals := [] - end -@@ -323,9 +336,10 @@ let emit_literals() = - (* Emit code to load the address of a symbol *) - - let emit_load_symbol_addr dst s = -- if (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit s then begin -- ` adrp {emit_reg dst}, {emit_symbol s}\n`; -- ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol s}\n` -+ if (not !Clflags.dlcode || Compilenv.symbol_in_current_unit s) && -+ not !Clflags.make_package (* not using -pack *) then begin -+ ` adrp {emit_reg dst}, {emit_symbol_hidden s}\n`; -+ ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol_hidden s}\n` - end else begin - ` adrp {emit_reg dst}, :got:{emit_symbol s}\n`; - ` ldr {emit_reg dst}, [{emit_reg dst}, #:got_lo12:{emit_symbol s}]\n` -@@ -575,8 +589,8 @@ let emit_instr i = - ` fmov {emit_reg i.res.(0)}, #{emit_printf "0x%Lx" f}\n` - else begin - let lbl = float_literal f in -- ` adrp {emit_reg reg_tmp1}, {emit_label lbl}\n`; -- ` ldr {emit_reg i.res.(0)}, [{emit_reg reg_tmp1}, #:lo12:{emit_label lbl}]\n` -+ ` adrp {emit_reg reg_tmp1}, {emit_label_hidden lbl}\n`; -+ ` ldr {emit_reg i.res.(0)}, [{emit_reg reg_tmp1}, #:lo12:{emit_label_hidden lbl}]\n` - end - | Lop(Iconst_symbol s) -> - emit_load_symbol_addr i.res.(0) s -@@ -609,7 +623,7 @@ let emit_instr i = - match addr with - | Iindexed _ -> i.arg.(0) - | Ibased(s, ofs) -> -- ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; -+ ` adrp {emit_reg reg_tmp1}, {emit_symbol_hidden_offset s ofs}\n`; - reg_tmp1 in - begin match size with - | Byte_unsigned -> -@@ -636,7 +650,7 @@ let emit_instr i = - match addr with - | Iindexed _ -> i.arg.(1) - | Ibased(s, ofs) -> -- ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; -+ ` adrp {emit_reg reg_tmp1}, {emit_symbol_hidden_offset s ofs}\n`; - reg_tmp1 in - begin match size with - | Byte_unsigned | Byte_signed -> -@@ -763,7 +777,9 @@ let emit_instr i = - | Lreturn -> - output_epilogue (fun () -> ` ret\n`) - | Llabel lbl -> -- `{emit_label lbl}:\n` -+ `{emit_label lbl}:\n`; -+ ` .hidden {emit_label_hidden lbl}\n`; -+ ` .set {emit_label_hidden lbl},{emit_label lbl}\n` - | Lbranch lbl -> - ` b {emit_label lbl}\n` - | Lcondbranch(tst, lbl) -> -@@ -891,6 +907,8 @@ let fundecl fundecl = - ` .globl {emit_symbol fundecl.fun_name}\n`; - ` .type {emit_symbol fundecl.fun_name}, %function\n`; - `{emit_symbol fundecl.fun_name}:\n`; -+ ` .hidden {emit_symbol_hidden fundecl.fun_name}\n`; -+ ` .set {emit_symbol_hidden fundecl.fun_name},{emit_symbol fundecl.fun_name}\n`; - emit_debug_info fundecl.fun_dbg; - cfi_startproc(); - if !Clflags.gprofile then emit_profile(); -@@ -924,7 +942,10 @@ let fundecl fundecl = - - let emit_item = function - | Cglobal_symbol s -> ` .globl {emit_symbol s}\n`; -- | Cdefine_symbol s -> `{emit_symbol s}:\n` -+ | Cdefine_symbol s -> -+ `{emit_symbol s}:\n`; -+ ` .hidden {emit_symbol_hidden s}\n`; -+ ` .set {emit_symbol_hidden s},{emit_symbol s}\n` - | Cint8 n -> ` .byte {emit_int n}\n` - | Cint16 n -> ` .short {emit_int n}\n` - | Cint32 n -> ` .long {emit_nativeint n}\n` -@@ -981,7 +1002,10 @@ let end_assembly () = - efa_align = (fun n -> ` .align {emit_int(Misc.log2 n)}\n`); - efa_label_rel = (fun lbl ofs -> - ` .long {emit_label lbl} - . + {emit_int32 ofs}\n`); -- efa_def_label = (fun lbl -> `{emit_label lbl}:\n`); -+ efa_def_label = (fun lbl -> -+ `{emit_label lbl}:\n`; -+ ` .hidden {emit_label_hidden lbl}\n`; -+ ` .set {emit_label_hidden lbl},{emit_label lbl}\n`); - efa_string = (fun s -> emit_string_directive " .asciz " s) }; - ` .type {emit_symbol lbl}, %object\n`; - ` .size {emit_symbol lbl}, .-{emit_symbol lbl}\n`; --- -2.14.0 - diff --git a/ocaml.spec b/ocaml.spec index bd039c6..a31e3d9 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -20,16 +20,14 @@ %global test_arches aarch64 %{power64} x86_64 # These are the architectures for which the tests must pass otherwise # the build will fail. -# aarch64 tests are broken by the interim patch -# 0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch -%global test_arches_required %{power64} x86_64 +%global test_arches_required aarch64 %{power64} x86_64 # Architectures where parallel builds fail. #%global no_parallel_build_arches aarch64 Name: ocaml Version: 4.05.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: OCaml compiler and programming environment @@ -79,9 +77,7 @@ Patch0011: 0011-Another-immediate-range-fix.patch # Fix for some aarch64 linker problems. # https://caml.inria.fr/mantis/view.php?id=7585 -# This patch is from https://github.com/ocaml/ocaml/pull/1268 -# where at time of writing it is not upstream. -Patch0012: 0012-arm64-Emit-hidden-alias-for-each-global-symbol.patch +Patch0012: 0012-AArch64-GOT-fixed.patch BuildRequires: binutils-devel BuildRequires: ncurses-devel @@ -471,6 +467,10 @@ fi %changelog +* Wed Sep 13 2017 Richard W.M. Jones - 4.05.0-4 +- Add final upstream fix for aarch64/binutils relocation problems. + https://github.com/ocaml/ocaml/pull/1330 + * Wed Sep 06 2017 Richard W.M. Jones - 4.05.0-3 - Include interim fix for aarch64/binutils relocation problems.