Commit 811648ff authored by kito's avatar kito 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274137 138bc75d-0d04-0410-961f-82ee72b054a4
parent 3c04a7b1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment