[m-users.] ARM Linux toolchain
Vladimir Komendantskiy
komendantsky at gmail.com
Fri Feb 12 12:08:06 AEDT 2016
Hi,
I'm trying to compile Mercury git HEAD as a cross-compiler for an ARM Linux
target (GCC 5.3.1). To configure, I reuse the cross-compile script
tools/configure_mingw_cross with the right host and gcc name. I get
compile-time errors quite soon:
../scripts/mgnuc --grade asm_fast.gc --c-debug --no-ansi -- -c
mercury_deep_copy.c -o mercury_deep_copy.o
In file included from mercury_deep_copy.c:59:0:
mercury_deep_copy_body.h: In function ‘MR_deep_copy’:
mercury_deep_copy_body.h:848:1: error: unable to find a register to spill
mercury_deep_copy_body.h:848:1: error: this is the insn:
(insn 446 451 2140 47 (set (reg:SI 958)
(mem/f:SI (plus:SI (reg/f:SI 591 [
functor_desc_103->MR_du_functor_arg_types ])
(reg:SI 296 [ D.10539 ])) [0 *_199+0 S4 A32]))
mercury_deep_copy_body.h:345 615 {*thumb2_movsi_vfp}
(expr_list:REG_DEAD (reg/f:SI 591 [
functor_desc_103->MR_du_functor_arg_types ])
(expr_list:REG_DEAD (reg:SI 296 [ D.10539 ])
(expr_list:REG_EQUIV (mem:SI (reg/f:SI 13 sp) [0 S4 A32])
(nil)))))
An older post [1] suggests adding -O1 to CFLAGS. In fact yes, adding
"CFLAGS += -O1" in Mmake.common solves this one.
[1] http://www.mercurylang.org/list-archives/users/2013-June/007597.html
However another error follows:
mercury_layout_util.c: In function ‘MR_get_type_and_value’:
mercury_layout_util.c:946:1: error: unable to find a register to spill
mercury_layout_util.c:946:1: error: this is the insn:
(insn 13 34 36 2 (set (reg:SI 126)
(mem/f/c:SI (plus:SI (reg/f:SI 103 afp)
(const_int 40 [0x28])) [0 value+0 S4 A32]))
mercury_layout_util.c:943 615 {*thumb2_movsi_vfp}
(nil))
Is there a better solution then the -O1 workaround? Possibly I should
disable asm_fast* grades?
--Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20160212/9b284d7f/attachment.html>
More information about the users
mailing list