From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com
 [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id A0A18B6BA
 for <dev@dpdk.org>; Fri, 20 Feb 2015 15:05:28 +0100 (CET)
Received: by mail-wi0-f170.google.com with SMTP id hi2so6656415wib.1
 for <dev@dpdk.org>; Fri, 20 Feb 2015 06:05:28 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=MDhpegGpYdOlSG6UaICdwriMUz5r90lO9F5L2icqYZc=;
 b=Q3vGmol9fWWPa8kTtkINHvpfBbX1cHFxlQdeXNgtBxbj5ZyZ/VR0FOuVCci1VaTGpV
 subzS+ra/if5v8At6Ip/NkYy6yBFrqRktXNJdUPk1PFINKs2I22NwUUnJ6a+2YunFD8O
 Wmagt3jRdRnQbzuyfuflHX/UtJvRPLi1Bcn3qroOogEwNNmIl6ynZD6JkvRszTR98Vqm
 ILZ3BSSLzPv/d/5cJeO9oC4XPxYAxd+tjNT0WY0Cp/MmASsZnvNJEdjs9EBhvZYgMzTL
 W6JOhpJ/gJAPR3zu3yoYS/Wpw1UWWXDEAuDHHV5zn8gzyRitLrYoU/2m3nSqZXynZUfW
 6z4g==
X-Gm-Message-State: ALoCoQmtDU86d3OsfcaLPvwMEDTsqaVbQnxAbNs+yLmoaDA/dwqaRBEhxlUEOcMPXg3WXfd1/KQb
X-Received: by 10.181.12.75 with SMTP id eo11mr18083784wid.74.1424441128445;
 Fri, 20 Feb 2015 06:05:28 -0800 (PST)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id s5sm7002593wia.1.2015.02.20.06.05.26
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 20 Feb 2015 06:05:27 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Panu Matilainen <pmatilai@redhat.com>
Date: Fri, 20 Feb 2015 15:04:56 +0100
Message-ID: <2614307.fg5h8BUtrJ@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; )
In-Reply-To: <7a06a1e8019a40d4175c6bc2e1d7e62cf956b291.1424261465.git.pmatilai@redhat.com>
References: <7a06a1e8019a40d4175c6bc2e1d7e62cf956b291.1424261465.git.pmatilai@redhat.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mk: Rework gcc version detection to permit
	versions newer than 4.x
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Feb 2015 14:05:28 -0000

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@redhat.com>

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.
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.