From patchwork Sun Oct 16 18:15:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 3142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1111023wrs; Sun, 16 Oct 2022 11:16:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BWrFQOdEcg5LIhNJcdaoaOHIc/9xeZ+Fwmi3ip+MKj3xqYGo0cCs79yQXPB9r19p9poPz X-Received: by 2002:a17:907:1c8a:b0:782:1a0d:3373 with SMTP id nb10-20020a1709071c8a00b007821a0d3373mr5739929ejc.135.1665944188022; Sun, 16 Oct 2022 11:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665944188; cv=none; d=google.com; s=arc-20160816; b=iRrv911eUHdMeZmYOr5xmGl8PuUI7ryQbSyk5gObBiDOg2LXKQcZT7Tsw5wGb9gQpY /GL56eluoFpWYw8sTY7zyKKHG0m6pE7i/73kb1aVIRWuPhxFKJicZGzQQ+wABS1jiTUA HpViRNFYILsKkaoYiDAeGF+TLI9zKIVCudYhK9jtrXqqzgbCWgvyYUar5379J7J+I2ZZ JARCEn29u+MFuLigbfPhLHqhdOzdk6ZjkHjhZA2wHFeN6+//UANTfBItYsQ497wMsNnF I6H80RORYpkMiVj26QW0sz7LHxXco9xvuYjsEki3hlRnl7EjJxd6aGU3yLVwZEqFy+pK rXDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=MiiM2pDUa1aAKTtG6Jg3xgDf6eoXvoJG3ubUMpE9xXc=; b=YYdbfCPGcWnuyJyPtO1jKW8UUjW7wpH2lpOJbeFNiU0KTDVKD3QIhOlYjW/5+TWq2G 647azWQy0pf83FbO272RAoV2uh69by/6ZHgN6vjjiGz3Cy0uRuJkDSYeExjwiBP0EfxS uUqkypw1I6pxraairVTVI+Wrg4uWqWQCcgvBF/g2D+3ywu5NX20Cuh0UJwNqId7WFsMv hglc1FnDG9W/PfnjOyVkEsa/cSlOM8LgI7ibZ6qB/leOtH1ut0txBoSkpuNDeCchdhJe bc9ZQuSYMPTE2a52LKXQiWDpiIbNFLsDsu6roYazOXsi7k01fh6ka8NBs1PqGx5/QPXg MBcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=mINDRF0n; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p15-20020a50cd8f000000b0045217702054si6884917edi.501.2022.10.16.11.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Oct 2022 11:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=mINDRF0n; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E7BA3385841F for ; Sun, 16 Oct 2022 18:16:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7BA3385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665944186; bh=MiiM2pDUa1aAKTtG6Jg3xgDf6eoXvoJG3ubUMpE9xXc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mINDRF0n6lGAoyjKz8+Csz9m+W1egSBZvWbVZ0PDxaoO3sBr8EZNLqXbm5PKF6Jk5 SGeJLICWb/H26Bd9dgVWyWlMcTHqL2Zr2jrWLj0XD/h3gD+NmzccWicK4iJGC637KQ 9ZqYmh5jIsTpTF2Zo2n3rO8NEJGqKk4Rzl31gxgs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 277AA3858D3C for ; Sun, 16 Oct 2022 18:15:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 277AA3858D3C Received: by mail-ed1-x52e.google.com with SMTP id m16so13198267edc.4 for ; Sun, 16 Oct 2022 11:15:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MiiM2pDUa1aAKTtG6Jg3xgDf6eoXvoJG3ubUMpE9xXc=; b=8MzbOT3lUnRDb7lSOfysjLqcU6s2nA9q32O93poGtoRhlBSgc2hbpKsjgIkubE4IeL RmFL/R6i1oaUj7mTeYq9Q4v5EmMAgprLM/Zkk8xCw0NpTSkK0ljOh/wHcO4rS4EFRJFv GFJvPK2tGVz3zsJ9jvqFwTXw3Bx4UeqUTxXC39H9t56yKl7oK8sDAcEcu9ZnZCVb36CQ EOLGAYTrPmbeI1nW7/LfEjQ1xpcHjaf6dyLr/FMK+Qcr+GjUN9efYK+WBNvMPdrws/co N+UoQwI4yVVEyOdpOoNcJIvngIR5UDbdKO35FJQiG4vsjEx3S3LVOaS9Pi/G+QAAa2QE gliA== X-Gm-Message-State: ACrzQf2nd7+diLftlS+i68DN9J1CpuOxQZ963+1O/SpqLIa4uu820W/+ c9r36++g69v1ecwoChvaBwdOzOq94wyXPQ== X-Received: by 2002:a05:6402:90b:b0:45c:16a0:ec1e with SMTP id g11-20020a056402090b00b0045c16a0ec1emr7249484edz.427.1665944141725; Sun, 16 Oct 2022 11:15:41 -0700 (PDT) Received: from localhost.localdomain ([2a02:2f0e:ca15:2800:b9d5:3001:b79f:f252]) by smtp.gmail.com with ESMTPSA id r26-20020aa7d59a000000b00457618d3409sm5758885edq.68.2022.10.16.11.15.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Oct 2022 11:15:41 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] microblaze: use strverscmp() in MICROBLAZE_VERSION_COMPARE() Date: Sun, 16 Oct 2022 21:15:31 +0300 Message-Id: <20221016181531.225006-1-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ovidiu Panait via Gcc-patches From: Ovidiu Panait Reply-To: Ovidiu Panait Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746869093041774871?= X-GMAIL-MSGID: =?utf-8?q?1746869093041774871?= 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 --- 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.