From: Ovidiu Panait <ovpanait@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] microblaze: use strverscmp() in MICROBLAZE_VERSION_COMPARE()
Date: Sun, 16 Oct 2022 21:15:31 +0300 [thread overview]
Message-ID: <20221016181531.225006-1-ovpanait@gmail.com> (raw)
Currently, combining '-mxl-multiply-high' with -mcpu=v11.0 produces the
following bogus warning:
echo "int main(){}" | ./microblazeel-linux-gnu-gcc -mxl-multiply-high \
-mno-xl-soft-mul -mcpu=v11.0 -nostdlib -x c -
warning: '-mxl-multiply-high' can be used only with '-mcpu=v6.00.a' or greater
Since strcasecmp() doesn't properly compare single-digit cpu versions with
double-digit versions, switch MICROBLAZE_VERSION_COMPARE() to use strverscmp()
instead.
* config/microblaze/microblaze.cc (MICROBLAZE_VERSION_COMPARE): Use
strverscmp() to fix bogus warnings when passing multi-digit -mcpu
versions on the command line.
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
---
gcc/config/microblaze/microblaze.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
index 8fcca1829f6..28a2a9596d1 100644
--- a/gcc/config/microblaze/microblaze.cc
+++ b/gcc/config/microblaze/microblaze.cc
@@ -56,7 +56,7 @@
/* This file should be included last. */
#include "target-def.h"
-#define MICROBLAZE_VERSION_COMPARE(VA,VB) strcasecmp (VA, VB)
+#define MICROBLAZE_VERSION_COMPARE(VA,VB) strverscmp (VA, VB)
/* Classifies an address.
--
2.25.1
next reply other threads:[~2022-10-16 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-16 18:15 Ovidiu Panait [this message]
2022-10-24 15:18 ` Jeff Law
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=20221016181531.225006-1-ovpanait@gmail.com \
--to=ovpanait@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/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).