From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52e.google.com with SMTP id m16so13198267edc.4 for ; Sun, 16 Oct 2022 11:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=MiiM2pDUa1aAKTtG6Jg3xgDf6eoXvoJG3ubUMpE9xXc=; b=pCmkAqs3hABOEHAEvFn4oCtUU3rLSmQAHy9s+2xtbAug7j0gFKkzaBEhM9aNVTv24p jhK0ewRdPgjfKHC5CXcf2CP45oLBMXyUxaSk0O9zpeQWLbvneDEaDbNVufbfJoKXMeK2 crT3UTR0FCUkoI9fe5IcLBZC5G+pHhSCm5/UEiKlW5L7v/Pm7Hhg8XvNQV8iDXBwOPIF 0iy9OC8ggNrzke9Fu/UL8lk4n/Dk8SrIIUyNtJUruCQyV4yZNjDltXtmNFmTlmlSKKhs 2TC7hvqMFJmywZal7pRcDoRKGpcPy+XyIL+WY9zwGT2Vz1excKz1aE1tFLi0xqDCgsD4 hLNg== 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-Google-Smtp-Source: AMsMyM70EoRg+/pA90NlV+Rz/6JZbcbktwbS4p+/uB8ZvL8zTDJLp+CSrw4JAAe6GGdff0fVZ2WFaA== 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) From: Ovidiu Panait 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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. -- 2.25.1