[PATCH 2/2] RISC-V: remove CM_PIC as it doesn't do much
Vineet Gupta
vineetg@rivosinc.com
Wed Aug 31 20:39:45 GMT 2022
On 8/31/22 07:57, Palmer Dabbelt wrote:
>> if (flag_pic)
>> - riscv_cmodel = CM_PIC;
>> + riscv_cmodel = CM_MEDANY;
>>
>> /* We get better code with explicit relocs for CM_MEDLOW, but
>> worse code for the others (for now). Pick the best default. */
>
> I'm fine either way on this one: having CM_PIC gone makes it a bit
> more likely to confuse CM_MEDANY with PIC, but flag_pic is overriding
> riscv_cmodel anyway so this isn't really used and deleting code is
> always a plus.
Indeed this was the most contentious part of removing CM_PIC, but it
seems this is the way fwd. I'll add Kito's comment from [1] in code to
make it more explicit.
[1]https://github.com/riscv-non-isa/riscv-c-api-doc/pull/11#issuecomment-686385585
Thx,
-Vineett
More information about the Gcc-patches
mailing list