[PATCH] genmultilib: Add sanity check

2022-11-02 Thread Christophe Lyon via Gcc-patches
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-

Re: [PATCH] genmultilib: Add sanity check

2022-11-02 Thread Joseph Myers
On Wed, 2 Nov 2022, Christophe Lyon via Gcc-patches wrote: > +# Sanity check: make sure we have as many dirnames as options > +if [ -n "${dirnames}" ]; then > +options_arr=($options) This is an sh script; arrays are a bash feature. Building GCC isn't supposed to need bash (or to rely on $(S

Re: [PATCH] genmultilib: Add sanity check

2022-11-02 Thread Christophe Lyon via Gcc-patches
On 11/2/22 18:29, Joseph Myers wrote: On Wed, 2 Nov 2022, Christophe Lyon via Gcc-patches wrote: +# Sanity check: make sure we have as many dirnames as options +if [ -n "${dirnames}" ]; then +options_arr=($options) This is an sh script; arrays are a bash feature. Building GCC isn't su