Re: [PATCH 2/2] RISC-V: Add riscv{32, 64}be with big endian as default

2021-02-07 Thread Marcus Comstedt
Hi again. Sorry, but I just realized that the "-melf" part isn't the same in all of {elf,linux,freebsd}.h; linux.h has a LD_EMUL_SUFFIX which the other two are lacking. Which means that the only truly common part is %{mbig-endian:-EB} \ %{mlittle-endian:-EL} \ So is it worth a define to c

Re: [PATCH 2/2] RISC-V: Add riscv{32, 64}be with big endian as default

2021-02-03 Thread Marcus Comstedt
Kito Cheng writes: > Yeah, but I'd like to include following 2 lines too: > > %{mbig-endian:-EB} \ > %{mlittle-endian:-EL} \ > > I saw it's just the same among 3 files. Ah, I see. Then it becomes a little more of a mixed grab bag. I see that SuperH has a spec "subtarget_link_spec" which incl

Re: [PATCH 2/2] RISC-V: Add riscv{32, 64}be with big endian as default

2021-02-02 Thread Kito Cheng via Gcc-patches
> > Could you extract the endian related LINK_SPEC change to > > ENDIAN_LINK_SPEC to riscv.h, so that we can prevent > > duplicate this several times. > > You mean a define which expands to > > "-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" Yeah, but I'd like to include following 2 lines too: %{

Re: [PATCH 2/2] RISC-V: Add riscv{32, 64}be with big endian as default

2021-01-29 Thread Marcus Comstedt
Kito Cheng writes: >> diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h >> index 973efdaed7b..7e65e499031 100644 >> --- a/gcc/config/riscv/elf.h >> +++ b/gcc/config/riscv/elf.h >> @@ -18,7 +18,7 @@ along with GCC; see the file COPYING3. If not see >> .

Re: [PATCH 2/2] RISC-V: Add riscv{32, 64}be with big endian as default

2021-01-29 Thread Kito Cheng via Gcc-patches
> diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h > index 973efdaed7b..7e65e499031 100644 > --- a/gcc/config/riscv/elf.h > +++ b/gcc/config/riscv/elf.h > @@ -18,7 +18,7 @@ along with GCC; see the file COPYING3. If not see > . */ > > #define LINK_SPEC "