Kito Cheng <kito.ch...@gmail.com> 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
>>  <http://www.gnu.org/licenses/>.  */
>>
>>  #define LINK_SPEC "\
>> --melf" XLEN_SPEC "lriscv \
>> +-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv \
>
> 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"

?  Sure, but I don't think ENDIAN_LINK_SPEC would be a good name for
it since it defines the word size as well as the endianness, and also
ELF in general.

Maybe ELF_LINK_SPEC?  The word size and endianness are also ELF
properties (as encoded in EI_CLASS and EI_DATA).


  // Marcus


Reply via email to