This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RISC-V: Don't built 64-bit multilibs on 32-bit targets
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, Palmer Dabbelt <palmer at dabbelt dot com>, <patches at groups dot riscv dot org>
- Date: Sun, 30 Apr 2017 23:38:35 +0000
- Subject: Re: [PATCH] RISC-V: Don't built 64-bit multilibs on 32-bit targets
- Authentication-results: sourceware.org; auth=none
- References: <20170429015927.22205-1-palmer@dabbelt.com> <4629D9E4-693D-4DE5-AC69-3F231FB9A477@gmail.com>
On Sat, 29 Apr 2017, Richard Biener wrote:
> On April 29, 2017 3:59:27 AM GMT+02:00, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> >We've been telling people that "riscv32-*" and "riscv64-*" are exactly
> >the same toolchain aside from defaults for "-march" and "-mabi", but it
> >appears we were lying. As far as I can tell, binutils doesn't support
> >64-bit targets when it has been configured for a 32-bit target. This
> >seems to be an upstream limitation that we can't fix in the RISC-V
> >port.
> >This means that building the toolchain with "--with-arch=rv32i
> >--enable-multilib" will fail when building the 64-bit multilibs.
> >
> >This patch adds two new multilib target fragments that don't add the
> >64-bit multilibs. This fixes the build, but has the disadvantage of
> >making our 32-bit and 64-bit toolchains very different.
>
> PowerPC for 32bit can use powerpc64 as target and enable 32bit code-gen
> by default at configure time. Maybe this is an option for riscv as
> well.
Specifically, in such cases the GCC configure option is
--enable-target=all to enable 64-bit multilibs for a default-32-bit
target, and the binutils/GDB configure option is --enable-64-bit-bfd. But
you can also make a binutils/GDB target include 64-bit support
unconditionally without requiring --enable-64-bit-bfd.
--
Joseph S. Myers
joseph@codesourcery.com