In general gcc toolchain folder contains several targets, for instance,
baremetal and Linux ones. The precommitted tests address this case by
adding riscv64-unknown-linux-gnu/ folder to toolchain. This breaks driver's
include and lib paths, since riscv baremetal triple is now normalized to
"riscv{32|64}-unknown-unknown-elf" rather than just to "riscv{32|64}-unknown-elf",
and GCCInstallation uses this search priority: "riscv{32|64}-unknown-linux-gnu",
"riscv{32|64}-linux-gnu", "riscv{32|64}-unknown-elf", choosing Linux target.
So withouth this patch driver makes incorrect mix of completely different target triples in paths.
This patch fixes this issue by passing triple alias for baremetal target.
This seems like the wrong place to add this workaround, shouldn't the change be in GCCInstallation::init? That way targets other than RISC-V also benefit from this fix.