genmultilib: Add sanity check
authorChristophe Lyon <christophe.lyon@arm.com>
Thu, 27 Oct 2022 08:50:53 +0000 (08:50 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Mon, 21 Nov 2022 09:20:59 +0000 (10:20 +0100)
commitf0d3b6e384a68f8b58bc750f240a15cad92600cd
treece01134ab3ce0fbb894e2e49c275b10027c927d1
parent3d3b561fc3aaceb682ade756c3bb1ebb3f495231
genmultilib: Add sanity check

When a list of dirnames is provided to genmultilib, its length is
expected to match the number of options.  If this is not the case, the
build fails later for reasons not obviously related to this mistake.
This patch adds a sanity check to help diagnose such cases.

Tested by adding an option to t-aarch64 and no corresponding dirname,
with both bash and dash.

v2: do not use arrays (bash feature).

OK for trunk?

gcc/ChangeLog:

* genmultilib: Add sanity check.
gcc/genmultilib