<div dir="ltr">Thanks. If this fixes your problem, that's a good sign. :)<div><br></div><div>Can you file a ticket since changes to 4.11 require one?</div><div><br></div><div>Also please submit the patch as generated by git format-patch.</div><div>That really helps.</div><div><br></div><div>--joel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 27, 2017 at 5:11 PM, Hill, Jeff <span dir="ltr"><<a href="mailto:johill@lanl.gov" target="_blank">johill@lanl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello all,<br>
<br>
We are encountering some assembler errors, see below, when building RTEMS 4.11 for architecture nios2 with the default source builder generated tools.<br>
<br>
nios2-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -I.. -I../../cpukit/../../../<wbr>altera-sys-config-s43x-BPPM/<wbr>lib/include -I/home/hill/nios2-rtems/<wbr>rtems/rtems-git/c/src/../../<wbr>cpukit/libmisc/shell   -O3 -g -Wall -Wmissing-prototypes -Wimplicit-function-<wbr>declaration -Wstrict-prototypes -Wnested-externs -MT shell/libshell_a-hexdump-<wbr>parse.o -MD -MP -MF shell/.deps/libshell_a-<wbr>hexdump-parse.Tpo -c -o shell/libshell_a-hexdump-<wbr>parse.o `test -f 'shell/hexdump-parse.c' || echo '/home/hill/nios2-rtems/rtems/<wbr>rtems-git/c/src/../../cpukit/<wbr>libmisc/'`shell/hexdump-parse.<wbr>c<br>
{standard input}: Assembler messages:<br>
{standard input}:881: Error: r31 cannot be used with jmp; use ret instead<br>
make[5]: *** [shell/libshell_a-hexdump-<wbr>parse.o] Error 1<br>
<br>
Some additions, see below, to the RTEMS 4.11 source builder configuration file,  rtems-nios2.bset, appear to temporarily resolve this issue backporting a patch from the gcc mainline. I don't claim to have completed exhaustive testing at this point nor fully understand gcc internals, FWIW.<br>
<br>
#<br>
# Add fix for improper use of register 31 with jump instruction issue,<br>
# resulting in some assembler errors as follows<br>
#<br>
# "Error: r31 cannot be used with jmp; use ret instead"<br>
#<br>
%patch add gcc -p0 pw://<a href="http://patchwork.ozlabs.org/patch/471401/raw/nios2-add-IJMP_REGS-reg-class-for-indirect-jumps.patch" rel="noreferrer" target="_blank">patchwork.ozlabs.org/<wbr>patch/471401/raw/nios2-add-<wbr>IJMP_REGS-reg-class-for-<wbr>indirect-jumps.patch</a><br>
%hash md5 nios2-add-IJMP_REGS-reg-class-<wbr>for-indirect-jumps.patch 90d1052167fe25f561a8f9ab06a744<wbr>99<br>
<br>
Jeff Hill<br>
<br>
#<br>
# Tools Set for RTEMS NIOS 4.11 Stable<br>
#<br>
<br>
%define release 1<br>
<br>
%define rtems_arch nios2<br>
<br>
#<br>
# The RTEMS 4.11 base defines.<br>
#<br>
%include rtems-4.11-base.bset<br>
<br>
#<br>
# Add fix for improper use of register 31 with jump instruction issue,<br>
# resulting in some assembler errors as follows<br>
#<br>
# "Error: r31 cannot be used with jmp; use ret instead"<br>
#<br>
%patch add gcc -p0 pw://<a href="http://patchwork.ozlabs.org/patch/471401/raw/nios2-add-IJMP_REGS-reg-class-for-indirect-jumps.patch" rel="noreferrer" target="_blank">patchwork.ozlabs.org/<wbr>patch/471401/raw/nios2-add-<wbr>IJMP_REGS-reg-class-for-<wbr>indirect-jumps.patch</a><br>
%hash md5 nios2-add-IJMP_REGS-reg-class-<wbr>for-indirect-jumps.patch 90d1052167fe25f561a8f9ab06a744<wbr>99<br>
<br>
#<br>
# Tools configuration.<br>
#<br>
4.11/rtems-autotools<br>
devel/expat-2.1.0-1<br>
tools/rtems-binutils-2.26-1<br>
tools/rtems-gcc-4.9.3-newlib-<wbr>2.2.0-20150423-1<br>
tools/rtems-gdb-7.9-1<br>
tools/rtems-tools-4.11-1<br>
tools/rtems-kernel-4.11<br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
</blockquote></div><br></div>