This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] RISC-V: Don't built 64-bit multilibs on 32-bit targets


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]