public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: Kito Cheng <kito.cheng@gmail.com>
Subject: [PATCH] riscv: fix cross compiler
Date: Tue, 25 Oct 2022 07:01:02 +0200	[thread overview]
Message-ID: <1842f47d-a6e7-8a9e-3ec7-82c7f7d33f57@suse.cz> (raw)
In-Reply-To: <CA+yXCZCLtmzjYbTEykrg3=0URVgq+LhPdEuFGgDKHAsMD6ZS9g@mail.gmail.com>

More riscv_get_valid_option_values out of

Fixes:
riscv/riscv-common.cc:1748:40: error: ‘riscv_get_valid_option_values’ was not declared in this scope

Now I get:

./xgcc -B. --completion=-mcp
-mcpu=sifive-e20
-mcpu=sifive-e21
-mcpu=sifive-e24
-mcpu=sifive-e31
-mcpu=sifive-e34
-mcpu=sifive-e76
-mcpu=sifive-s21
-mcpu=sifive-s51
-mcpu=sifive-s54
-mcpu=sifive-s76
-mcpu=sifive-u54
-mcpu=sifive-u74

./xgcc -B. --completion=-mtune
-mtune=rocket
-mtune=sifive-3-series
-mtune=sifive-5-series
-mtune=sifive-7-series
-mtune=thead-c906
-mtune=size
-mtune=sifive-e20
-mtune=sifive-e21
-mtune=sifive-e24
-mtune=sifive-e31
-mtune=sifive-e34
-mtune=sifive-e76
-mtune=sifive-s21
-mtune=sifive-s51
-mtune=sifive-s54
-mtune=sifive-s76
-mtune=sifive-u54
-mtune=sifive-u74

Ready for master?

Thanks,
Martin

gcc/ChangeLog:

	* common/config/riscv/riscv-common.cc
	  (riscv_get_valid_option_values): Get out of ifdef.
---
 gcc/common/config/riscv/riscv-common.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
index 697bfe435c8..dead3802f83 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -1691,6 +1691,10 @@ riscv_compute_multilib (
     return xstrdup (multilib_infos[best_match_multi_lib].path.c_str ());
 }
 
+#undef TARGET_COMPUTE_MULTILIB
+#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib
+#endif
+
 vec<const char *>
 riscv_get_valid_option_values (int option_code,
 			       const char *prefix ATTRIBUTE_UNUSED)
@@ -1726,10 +1730,6 @@ riscv_get_valid_option_values (int option_code,
   return v;
 }
 
-#undef TARGET_COMPUTE_MULTILIB
-#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib
-#endif
-
 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
 static const struct default_options riscv_option_optimization_table[] =
   {
-- 
2.38.0


  reply	other threads:[~2022-10-25  5:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30  2:05 [PATCH] RISC-V: Support --target-help for -mcpu/-mtune Kito Cheng
2022-10-24 10:18 ` Kito Cheng
2022-10-25  5:01   ` Martin Liška [this message]
2022-10-25  5:02     ` [PATCH] riscv: fix cross compiler Martin Liška
2022-10-25  5:10       ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1842f47d-a6e7-8a9e-3ec7-82c7f7d33f57@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).