On 12/1/20 2:29 AM, Kito Cheng 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.
>
> So I think it would be great to have a target specific way to determine
> the multi-lib re-use rule, then we could write those rule in C, instead
> of expand every possible case in MULTILIB_REUSE.
>
> * Here is an example for RISC-V multi-lib rules:
> https://gist.github.com/kito-cheng/0289cd42d9a756382e5afeb77b42b73b
>
> gcc/ChangeLog:
>
>       * common/common-target.def (compute_multilib): New.
>       * common/common-targhooks.c (default_compute_multilib): New.
>       * doc/tm.texi.in (TARGET_COMPUTE_MULTILIB): New.
>       * doc/tm.texi: Regen.
>       * gcc.c: Include common/common-target.h.
>       (set_multilib_dir) Call targetm_common.compute_multilib.
>       (SWITCH_LIVE): Move to opts.h.
>       (SWITCH_FALSE): Ditto.
>       (SWITCH_IGNORE): Ditto.
>       (SWITCH_IGNORE_PERMANENTLY): Ditto.
>       (SWITCH_KEEP_FOR_GCC): Ditto.
>       (struct switchstr): Ditto.
>       * opts.h (SWITCH_LIVE): Move from gcc.c.
>       (SWITCH_FALSE): Ditto.
>       (SWITCH_IGNORE): Ditto.
>       (SWITCH_IGNORE_PERMANENTLY): Ditto.
>       (SWITCH_KEEP_FOR_GCC): Ditto.
>       (struct switchstr): Ditto.
Can this defer to gcc-12?  We're well into stage3 at this point.

jeff

Reply via email to