https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116347

Christoph Müllner <cmuellner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-10-17
                 CC|                            |cmuellner at gcc dot gnu.org

--- Comment #1 from Christoph Müllner <cmuellner at gcc dot gnu.org> ---
Currently, the string "thead-c906" is used as an identifier for a CPU
(RISCV_CORE) and a tuning (RISCV_TUNE). The help message lists under "valid
arguments for -mtune= option" all tuning identifiers followed by all CPU
identifiers.

I don't think changing the identifier is the right thing to do, as it would
break people's build scripts.

Instead, I think it would be better to make the help-string-generator aware of
such cases.

Looking into the code, this should not be too hard:
riscv_get_valid_option_values() in gcc/common/config/riscv/riscv-common.cc
needs to be adjusted (in case OPT_mtune_) to avoid adding duplicates to the
result vector. The function vec_safe_iterate() should help to iterate over
existing entries. The duplication check needs to use strcmp() as the vector
elements are const-char-pointers.
  • [Bug target/116347] [13/14/15 on... cmuellner at gcc dot gnu.org via Gcc-bugs

Reply via email to