From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 2678C3858421 for ; Mon, 24 Oct 2022 15:19:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2678C3858421 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-il1-x132.google.com with SMTP id o2so1948477ilo.8 for ; Mon, 24 Oct 2022 08:19:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Vo1Xf8FyocYpGtzJzJZvHAUUfkuOz9vru1trs9MvmgI=; b=YRtq7jJizVYgGKdHWjpYqjeldylwzCxpP5w+jOsX1WEftG+q8itK//bA/GUMiwxcbP +HnTwN91Awoa7cTp2+VMMOCjcNHOHw4kwbTCOds1HzC+MGTGDafamLQGJd6vZbX8ZjXA btYc45ktNAPPkS4EbYndBjnWhIA8P+Pujbf46wF2B4EFAYt6YtYwLY7N3oyz4cT0Tett kEWvjuHOJyvwdygW1oLDbrLgz2W7VsuQ1y9K7BvN1XMYULziv07FqxypMJyER1gX4eVf xBVfFjCpcOl1PCd0GHo75Nb3z9o5R/f/8Gg05Zk/0jqRaVW8uBmj62Bdfp5RNCqaUt9w hP8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vo1Xf8FyocYpGtzJzJZvHAUUfkuOz9vru1trs9MvmgI=; b=0tapIyaDRN1AOipramXJBiZ0+rwJSpydEJqreMkgR2XdJeg8Z/HAd3ZPK9X2qW3PKJ Q09r67+Pv+FDOQwHM49cDQoXvbQsL9ypaQzhDOiJk+PjKNoqzZhZd7jdKF4wZSizCYJQ hsroz7Yr6sCffB97wPfLlyW4zr3rL3zC+qrNfsysGoAnJ689ygDDPOl5+AlUE73tYP8/ yaT1VmsTng1V+Qe9r8GONwX4ikz8r7rsZqptdl/copPYyXf6U+Y2jd+RK/Zu9CXHkwOg 3N0/FfaSgMWJtS1y657WEo4wZIbgQQZukNOSY1RP4pIZ4OlfKDdDLwrtYJ4xBtitFt0A FsdA== X-Gm-Message-State: ACrzQf28l8loml9TmfXRGsarXZjlBuSz2qDUHfn8Q8YedIViHQ53UHgM LFMblsPqnR6lV+xu00xBQnI= X-Google-Smtp-Source: AMsMyM59kt9ZKaHBmubEezUO60wLw8LHsSAS5wjLZPl0VWaandpI4DDOy0nyQk8ebjJXKiTMkIlnjQ== X-Received: by 2002:a92:ca49:0:b0:2fc:73d3:d57f with SMTP id q9-20020a92ca49000000b002fc73d3d57fmr22927349ilo.116.1666624747157; Mon, 24 Oct 2022 08:19:07 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id h47-20020a022b2f000000b003636e5c4612sm7319222jaa.33.2022.10.24.08.18.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 08:19:00 -0700 (PDT) Message-ID: Date: Mon, 24 Oct 2022 09:18:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] microblaze: use strverscmp() in MICROBLAZE_VERSION_COMPARE() Content-Language: en-US To: Ovidiu Panait , gcc-patches@gcc.gnu.org References: <20221016181531.225006-1-ovpanait@gmail.com> From: Jeff Law In-Reply-To: <20221016181531.225006-1-ovpanait@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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: On 10/16/22 12:15, Ovidiu Panait via Gcc-patches wrote: > 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. But strverscmp doesn't ignore character case.  ISTM that you need to canonicalize the case first if you're going to use strverscmp. Jeff