From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x Date: Tue, 24 Feb 2015 03:46:41 +0100 Message-ID: <1597878.lL4fhc8lIW@xps13> References: <7a06a1e8019a40d4175c6bc2e1d7e62cf956b291.1424261465.git.pmatilai@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Panu Matilainen Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > 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, eliminate unnecessary negations while at it. > This makes the comparisons simpler, more obvious 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 Acked-by: Thomas Monjalon Applied, thanks