On Sat, Jul 7, 2018 at 11:30 AM, Andreas Schwab <sch...@linux-m68k.org> wrote:
> On Jul 07 2018, Jim Wilson <j...@sifive.com> wrote:
>> if you have separate binutils and gcc source trees, the build should
>> work.
>
> It's not the canadian cross build that fails, but the subsequent native
> build using the (misconfigured) canadian cross build.

This works for me.  I have a sysroot created from a live system.  I
configure/build/install a cross binutils, then cross gcc.  I put the
cross install tree on my path, then I configure/build/install the
canadian cross binutils and then gcc.  Then I copy the canadian cross
install tree to the RISC-V system and use it to bootstrap a native gcc
with Ada.

This is also presumably what the debian, fedora, and gentoo folks did
to get their first native compiler.  They didn't report any problems.

Is this the first time you are trying to build a native RISC-V
compiler for OpenSuse?  If you already built a C/C++ compiler, then I
would expect the Ada compiler build to work the same way.  But if this
is your first native RISC-V compiler build attempt then maybe there is
something different about how you are trying to do the build.  I could
share my build scripts with you but they are pretty simple.  It is
also possible to build a canadian cross compiler from github
riscv/riscv-gnu-toolchain using the linux-native makefile rule, but
since it has its own copy of glibc you might run into glibc versioning
problems.

One thing I could mention is that I started with a gcc-7.3 release,
because Ubuntu 18.04 has gcc-7.3 as the native compiler, and I wasn't
sure if gcc-7 Ada could build gcc-9 Ada.  Sometimes old Ada versions
can't compile new Ada versions.  So I actually did the canadian cross
build with binutils-2.30 and gcc-7.3.1, and then moved up from gcc-7
to gcc-9 on the RISC-V side.  I maybe haven't tried a canadian cross
build with a newer gcc version, so maybe something broke after gcc-7.
That seems unlikely though.

If you can give me details about exactly how you are trying to
canadian cross build the Ada compiler, I can try to reproduce your
problem here.

Jim

Reply via email to