Maybe one generic function (called e.g. tc-set-linker) whose arguments
are a preference-ordered list of supported linkers?
If currently used linker is not in the specified list, then this
function would force using first found linker from that list.

Forcing bfd only:
  tc-set-linker bfd

Forcing gold only:
  tc-set-linker gold

Forcing lld only:
  tc-set-linker lld

Forcing bfd or gold (with bfd preferred if both are available):
  tc-set-linker bfd gold

Forcing bfd or lld (with bfd preferred if both are available):
  tc-set-linker bfd lld

Forcing lld or bfd (with lld preferred if both are available):
  tc-set-linker lld bfd

Reply via email to