From patchwork Wed Jun 10 23:53:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1307273 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QaPDKKr6; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49j3jr3WTqz9sR4 for ; Thu, 11 Jun 2020 09:54:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 99D26885FB; Wed, 10 Jun 2020 23:54:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IVxf+S0VBFUM; Wed, 10 Jun 2020 23:54:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B32F6885E9; Wed, 10 Jun 2020 23:54:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 11B201BF402 for ; Wed, 10 Jun 2020 23:54:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0E4BC878B7 for ; Wed, 10 Jun 2020 23:54:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oi0P_LLyq4Ch for ; Wed, 10 Jun 2020 23:54:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A2D99878B2 for ; Wed, 10 Jun 2020 23:54:01 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id x1so4533050ejd.8 for ; Wed, 10 Jun 2020 16:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KkV0ikw2CMCTxapt336QifBPtkLl+4Y2LMrNsIGJu74=; b=QaPDKKr63FQixJKUbKyE7WGgmTen//RDZtnrQ/+sIejHdQMVmp4D4e7WmP86bOT+2c v4F4Z/Jzy+bUuKbeEA2Q6jr6tCPgaC9wUh05FS0QJGZyiTT83vxp6XpKUHFHGu8rSKYu qvM95YE6qLsAaekof+AldgL1bgF5tWGS6XI4HdY1UA4kzkovXdYebKKZ/3gkRZK3z4XN k4TFK11Wk+OOpB/PwHp3Pks+H9XeYCici0GDzvb8myJrUqyANueRbP0LoBFxYCK5A/wh 7ZmRHx8S5U5YiSI1UTk4o18t2WbKFPxjb/uD60wkMaE5DfwmjyU8WQr67pabHYBuZ1bH FPvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KkV0ikw2CMCTxapt336QifBPtkLl+4Y2LMrNsIGJu74=; b=LGq3ByB9hfhUiMl0e6zdC0d0HEo/XIoZkIPK9I77Z1apzdHUr7zTKJ2xWlapfRiFaE qUpqxqSqJaSG6p7VQqUmwTXsLCSk6YAx5Ob9d+axEcSXOSWpFxD6vR8cwEJDvErB77gL Np+7oF/PNWDfs8go0glP+eXjnlAHk5uadHnDavIoUVnugFAJAYdGsVakn9htVg9QqrkA miHqy/3Z+KsRa8o9MdLZpIqKOn/LVhtT4lB6tMdxiOYl7iuAjPC9Xooe0piJlUX/JAw3 VUj8JnqIvW0uWOv3owg+sIzSc+T9QUQy6rBiZ0V+PZQllbq8Ya+f6x1qTDATSmn4Q7QP 09jg== X-Gm-Message-State: AOAM5304VPlaHgiZ41jjXx/skTr9MxbL3pubzCSLZpKkboYGyvIuhKE1 b3YUq9LklxR40il94+FfH6MM5HaMTDWixQ== X-Google-Smtp-Source: ABdhPJw1d9bLdU/S4YvHN0fzE1K5EVd50eag+H9TWaIq5AaJWu7WaNBJ7Jcy9fuv0w9K2W3X5W4V1Q== X-Received: by 2002:a17:906:ae81:: with SMTP id md1mr5918206ejb.128.1591833239922; Wed, 10 Jun 2020 16:53:59 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id md8sm845583ejb.4.2020.06.10.16.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 16:53:59 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Thu, 11 Jun 2020 01:53:12 +0200 Message-Id: <20200610235313.204905-1-nolange79@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] toolchain: adjust version check to allow for single numbers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas De Schampheleire , Norbert Lange , Romain Naour , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" A gcc compiler, which was configured with --with-gcc-major-version-only, will only return a single number. (debian does this for example). A simple modification allows the check to work with both single numbers (eg. '9') and full versions (eg. '9.2.1'). Signed-off-by: Norbert Lange Reviewed-by: Romain Naour --- toolchain/helpers.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 44d0c83d1e..17bc159f3e 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -184,7 +184,7 @@ check_gcc_version = \ exit 0 ; \ fi; \ real_version=`$(1) -dumpversion` ; \ - if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \ + if [[ ! "$${real_version}." =~ ^$${expected_version}\. ]] ; then \ printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \ "$${expected_version}" "$${real_version}" ; \ exit 1 ; \