binutils ar does not support one-dash long options (they conflict with
operation code and modifier flags).
% ar -help ar: invalid option -- 'e' ... % ar -version ar: invalid option -- 'e' ... % ar x --plugin=xx x.a # ok % ar x -plugin=xx x.a ar: two different operation options specified % ar -plugin=/usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so x x.a ar: x: No such file or directory
Drop one-dash long options to simplify code and match the usual practice for
command line utilities.
Seems tangential to this patch? Test is fine, but probably should be committed separately.
Any particular reason you don't test the single-dash version here, but you do in the --format and --version options?