From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 713CF58F4 for ; Fri, 20 Feb 2015 16:25:05 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1KFP30p014840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Feb 2015 10:25:03 -0500 Received: from localhost.localdomain (vpn1-6-123.ams2.redhat.com [10.36.6.123]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1KFP1bF029575; Fri, 20 Feb 2015 10:25:02 -0500 Message-ID: <54E751CD.909@redhat.com> Date: Fri, 20 Feb 2015 17:25:01 +0200 From: Panu Matilainen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Thomas Monjalon References: <7a06a1e8019a40d4175c6bc2e1d7e62cf956b291.1424261465.git.pmatilai@redhat.com> <2614307.fg5h8BUtrJ@xps13> In-Reply-To: <2614307.fg5h8BUtrJ@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 15:25:05 -0000 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 > > 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 -