All of lore.kernel.org
 help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Thomas Monjalon
	<thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] mk: Rework gcc version detection to permit versions newer than 4.x
Date: Fri, 20 Feb 2015 17:25:01 +0200	[thread overview]
Message-ID: <54E751CD.909@redhat.com> (raw)
In-Reply-To: <2614307.fg5h8BUtrJ@xps13>

On 02/20/2015 04:04 PM, Thomas Monjalon wrote:
> Hi Panu,
>
> 2015-02-18 14:11, Panu Matilainen:
>> Separately comparing major and minor versions becomes seriously clumsy
>> when with major version changes, convert the entire version string into
>> a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use
>> that for comparisons. This simplifies the comparisons and makes
>> gcc 5.0 naturally recognized at least as capable as newest 4.x.
>>
>> This three-digit scheme would run into trouble if gcc ever went to
>> two-digit version segments, but that hasn't happened in the last 10+
>> years so it seems like a safe assumption.
>>
>> Signed-off-by: Panu Matilainen <pmatilai-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> Yes this version checking was totally buggy.
> Thanks for improving it.
>
> I have a comment about the conversion of old versions checks.
>
>> -ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
>> +ifneq ($(shell test $(GCC_VERSION) -le 430 && echo 1), 1)
>
> The previous check was a buggy "if not <= 4.3.x"
> Your check is "if not <= 4.3.0"
> So it's a bit different.

Ah, indeed. Thanks for pointing that out.

> And I think we should remove negation to make it simpler:
> 	"if >= 4.4.0"
>
> I have the same comment for other changes in the patch.

Ok, since the change seems welcome I'll fix/simplify the above cases and 
send a new version.

	- Panu -

  reply	other threads:[~2015-02-20 15:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 12:11 [PATCH] mk: Rework gcc version detection to permit versions newer than 4.x Panu Matilainen
     [not found] ` <7a06a1e8019a40d4175c6bc2e1d7e62cf956b291.1424261465.git.pmatilai-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-02-20 14:04   ` Thomas Monjalon
2015-02-20 15:25     ` Panu Matilainen [this message]
2015-02-23 14:53   ` [PATCH v2] " Panu Matilainen
     [not found]     ` <e2043c84f5643ec1c1bb09d9f695c214df6e9966.1424703222.git.pmatilai-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-02-24  2:46       ` Thomas Monjalon
2015-02-24  9:25         ` David Marchand
     [not found]           ` <CALwxeUsPydmOr+Rt6q4CK4uVGGp-Zq6cr+N4FxZC=sicL-HG-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24  9:50             ` Panu Matilainen
     [not found]               ` <54EC496C.7050200-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-02-24 10:09                 ` David Marchand
     [not found]                   ` <CALwxeUt0oDQ5nZB00mAAA=MV7nmPaLCXxos-fvPv1yMnrdP6YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 10:21                     ` David Marchand
     [not found]                       ` <CALwxeUvM=Tsw3kYnE36c0i-+29XmnxY6MWSjwk0ESyn74xiiSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 10:36                         ` Mcnamara, John
     [not found]                           ` <B27915DBBA3421428155699D51E4CFE2EC72CF-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-24 10:44                             ` David Marchand
     [not found]                               ` <CALwxeUvV=mHpjToixfdK02zDdhndLjvTAyfHBWz2KvQLikGShg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 10:50                                 ` Bruce Richardson
2015-02-24 10:53                                 ` Panu Matilainen
2015-02-24 10:58                                 ` Mcnamara, John
2015-02-24 10:21                     ` Panu Matilainen

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=54E751CD.909@redhat.com \
    --to=pmatilai-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.