On Wed, Jul 21, 2021 at 2:28 AM Kito Cheng <kito.ch...@sifive.com> wrote:
> Create a new hook to let target could override the multi-lib result, > the motivation is RISC-V might have very complicated multi-lib re-use > rule*, which is hard to maintain and use current multi-lib scripts, > we even hit the "argument list too long" error when we tried to add more > multi-lib reuse rule. > This looks OK to me, though I would rewrite the docs a bit. > +DEFHOOK > +(compute_multilib, > + "Some target like RISC-V might have complicated multilib reuse rule > which is\ > + hard to implemented on current multilib scheme, this hook allow target > to\ > + override the result from built-in multilib mechanism.\ > + @var{switches} is the raw option list with @var{n_switches} items;\ > + @var{multilib_dir} is the multi-lib result which compute by the > built-in\ > + multi-lib mechanism;\ > + @var{multilib_defaults} is the default options list for multi-lib; \ > + @var{multilib_select} is the string contain the list of supported > multi-lib, \ > + and the option checking list. \ > + @var{multilib_matches}, @var{multilib_exclusions}, and > @var{multilib_reuse} \ > + are corresponding to @var{MULTILIB_MATCHES}, @var{MULTILIB_EXCLUSIONS} \ > + @var{MULTILIB_REUSE}. \ > + The default definition does nothing but return @var{multilib_dir} > directly.", > I'd suggest instead "Some targets like RISC-V might have complicated multilib reuse rules which\n\ are hard to implement with the current multilib scheme. This hook allows\n\ targets to override the result from the built-in multilib mechanism.\n\ @var{switches} is the raw option list with @var{n_switches} items;\n\ @var{multilib_dir} is the multi-lib result which is computed by the built-in\n\ multi-lib mechanism;\n\ @var{multilib_defaults} is the default options list for multi-lib;\n\ @var{multilib_select} is the string containing the list of supported\n\ multi-libs, and the option checking list.\n\ @var{multilib_matches}, @var{multilib_exclusions}, and @var{multilib_reuse}\n\ are corresponding to @var{MULTILIB_MATCHES}, @var{MULTILIB_EXCLUSIONS},\n\ and @var{MULTILIB_REUSE}.\n\ The default definition does nothing but return @var{multilib_dir} directly." Jim