Skip to content
Snippets Groups Projects
Commit 7551a6e4 authored by Kito Cheng's avatar Kito Cheng Committed by Kito Cheng
Browse files

RISC-V: Handle extensions combination correctly in multilib-generator.

Input string consist of four parts:
  <primary arch>-<abi>-<additional arches>-<extensions>

and generator doing combination with <extensions> part, but it just
append the extension at the end of arch string, it might generate
invalid arch.

For example, without this patch `./multilib-generator rv32imafc-ilp32--d`
will generate:

MULTILIB_OPTIONS = march=rv32imafc/march=rv32imafcd mabi=ilp32
                                         ^^^^^^^^^^

and rv32imafcd is not in canonical order.

Tested with python 2.7 and python 3.6/3.7.

gcc/ChangeLog

	* gcc/config/riscv/multilib-generator: (canonical_order): New.
	(arch_canonicalize): Dito.
	Apply arch_canonicalize for alts.

From-SVN: r274137
parent c026e334
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment