This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RISC-V: Pass --no-relax to linker if -mno-relax is present.
- From: Jim Wilson <jimw at sifive dot com>
- To: Kito Cheng <kito dot cheng at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, RISC-V Patches <patches at groups dot riscv dot org>, Andrew Waterman <andrew at sifive dot com>, Palmer Dabbelt <palmer at sifive dot com>
- Date: Wed, 18 Apr 2018 17:51:40 -0700
- Subject: Re: [PATCH] RISC-V: Pass --no-relax to linker if -mno-relax is present.
- References: <CA+yXCZDrBcrNo2wXm++qqbST9Sxxp0E4720gN90GP99ShfJV1Q@mail.gmail.com>
On Wed, Apr 18, 2018 at 3:10 AM, Kito Cheng <kito.cheng@gmail.com> wrote:
> * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
> -mno-relax is present.
> * config/riscv/linux.h (LINK_SPEC): Ditto.
It is easy enough to use -Wl,--no-relax and there are other linker
options that require -Wl so I don't think this is very useful.
However, I think it could be useful if it turned off relaxation in
both the assembler and the linker, since currently there is no easy
way to do that. For the assembler, there is no option, but we can
emit .option norelax at the asm file start. It needs to be a real
option in order to make this work. Also, options should have a doc
entry, which is more important when it is a real option.
Jim