All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] NDS32 toolchain?
Date: Tue, 24 Apr 2018 08:14:18 -0400	[thread overview]
Message-ID: <20180424121418.GM31362@bill-the-cat.ec.rr.com> (raw)
In-Reply-To: <752D002CFF5D0F4FA35C0100F1D73F3F6B78CA59@ATCPCS16.andestech.com>

On Tue, Apr 24, 2018 at 03:10:02AM +0000, rick at andestech.com wrote:
> 
> 
> > -----Original Message-----
> > From: Tom Rini [mailto:trini at konsulko.com]
> > Sent: Tuesday, April 24, 2018 4:17 AM
> > To: u-boot at lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> > Subject: NDS32 toolchain?
> >
> > Hey,
> >
> > So I'm looking over my setups again at what we do and do not have build testing
> > and run-time testing, and I see that for nds32 I just cannot find a good toolchain.
> > If I try for example
> > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/x86_
> > 64-gcc-7.3.0-nolibc-nds32-elf.tar.xz
> > it first fails on the -G0 flag that we have set in and then it complains about a lack
> > of position independent code support.  Is the kernel.org toolchain perhaps
> > configured incorrectly?
> >
> 
> Hi Tom
> 
> You may try the following paths:
> 
> 1.
> github version
> https://github.com/andestech/build_script.git
> https://github.com/greentime/prebuilt-nds32-toolchain/releases

This binary gets a lot farther:
  CC      drivers/mtd/cfi_flash.o
drivers/mtd/cfi_flash.c: In function 'write_buff':
drivers/mtd/cfi_flash.c:1435:1: internal compiler error: in change_address_1, at emit-rtl.c:2126
 }
 ^
0x81fecd6 change_address_1
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/emit-rtl.c:2126
0x81ff26d adjust_address_1(rtx_def*, machine_mode, long long, int, int, int, long long)
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/emit-rtl.c:2264
0x8762488 nds32_spilt_doubleword(rtx_def**, bool)
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/config/nds32/nds32-md-auxiliary.c:3238
0x886be2f gen_split_7(rtx_insn*, rtx_def**)
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/config/nds32/nds32-doubleword.md:209
0x81fdf74 try_split(rtx_def*, rtx_insn*, int)
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/emit-rtl.c:3658
0x8450a37 split_insn
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/recog.c:2865
0x8450d0e split_all_insns()
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/recog.c:2955
0x8450d6a rest_of_handle_split_before_sched2
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/recog.c:3995
0x8450d6a execute
        /NOBACKUP/sqa2/greentime/contrib/travis/build_script/src_pkg/gcc-6.3.0/gcc/recog.c:4034
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
/home/trini/work/u-boot/u-boot/scripts/Makefile.build:280: recipe for target 'drivers/mtd/cfi_flash.o' failed
make[2]: *** [drivers/mtd/cfi_flash.o] Error 1
/home/trini/work/u-boot/u-boot/Makefile:1355: recipe for target 'drivers/mtd' failed
make[1]: *** [drivers/mtd] Error 2
make[1]: Leaving directory '/tmp/adp-ag101p'
Makefile:150: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

> 2.
> Arnd Bergmann built
> https://lkml.org/lkml/2018/4/17/395
> www.kernel.org/pub/tools/crosstool/files/bin/x86_64/6.4.0/x86_64-gcc-6.4.0-nolibc-nds32le-linux.tar.xz

Oddly, his 6.4.0 gets farther along than his 7.3.0 ones, but still
doesn't work as I get things like this:
  AS      arch/nds32/cpu/n1213/start.o
arch/nds32/cpu/n1213/start.S: Assembler messages:
arch/nds32/cpu/n1213/start.S:256:
Error: Incorrect syntax, sethi $ta,hi20(_start at GOTOFF).
arch/nds32/cpu/n1213/start.S:256:
Error: Incorrect syntax, ori $ta,$ta,lo12(_start at GOTOFF).
arch/nds32/cpu/n1213/start.S:256:
Warning: relax hint unrecognized instruction: line 254.

and it just keeps going from there.  You may want to drop him an email
about how he's configuring for nds32le.  Last time I talked with him, he
wasn't planning to re-spin the 7.3.x ones, but he might do gcc-8 once
it's ready.

> > Related, is there a QEMU target for nds32 that we could leverage so that once
> > the toolchain issue is resolved we can update .travis.yml to run tests on it?
> > Thanks!
> 
> I am applying the QEMU offering permit.
> If it is ok. I will prepare it for you.

Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180424/a994e226/attachment.sig>

  reply	other threads:[~2018-04-24 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 20:17 [U-Boot] NDS32 toolchain? Tom Rini
2018-04-24  3:10 ` rick at andestech.com
2018-04-24 12:14   ` Tom Rini [this message]
2018-04-25  3:27     ` rick at andestech.com
2018-04-25 13:03       ` Tom Rini
2018-05-07  2:54         ` rick at andestech.com
2018-05-14  8:31           ` Rick Chen
2018-05-14 11:16             ` Tom Rini
2018-05-28  6:45               ` Rick Chen
2018-06-07  8:18                 ` Rick Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180424121418.GM31362@bill-the-cat.ec.rr.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.