From patchwork Wed Apr 27 20:15:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 615803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3qwB5v3GWvz9t6M for ; Thu, 28 Apr 2016 06:15:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=EHxiSB16; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ABFD68C438; Wed, 27 Apr 2016 20:15:14 +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 UJ+Xu8n1-U8s; Wed, 27 Apr 2016 20:15:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8FE208C386; Wed, 27 Apr 2016 20:15:12 +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 D97971C0F9E for ; Wed, 27 Apr 2016 20:15:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D61908A05A for ; Wed, 27 Apr 2016 20:15:10 +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 fS9M10cvpzLr for ; Wed, 27 Apr 2016 20:15:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 105F086B33 for ; Wed, 27 Apr 2016 20:15:10 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id n129so7093479wmn.1 for ; Wed, 27 Apr 2016 13:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Sh/rB0ungtMJQXotvxasbyeOv5CYgrDvMJNLcrzEfGQ=; b=EHxiSB16aD+csBlly3FxuPbN2n/4lwa3Eh9GFf7p7z3Wmxy9bz2brF5/zcdMxryL/L nsqrhxB7znmkiZywe/0SI77hhREmW7eqBkNGwV1GHBEYa+UvL/yaQ/PwtqVe6Jw6ZZNg fFkshBzYj7eHyNURKBhYSqe5ai7WPuJjXGlMTVDT5FUWsTGvuKwE8LEr5VMDM+g0yla2 V7Hv+oJQI0NggZqWh5uJylkgIGpnk2rFrmtUBFiyGsr+X1EYqFx5TJapRiCp0ygRtMEy +gUucHFStfjY8jFmw3WntYw9d7qYmbxLxSfMJIAt4hR/sbBPwt7GPBF7t8Sw7mmdU08B Ml5g== 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; bh=Sh/rB0ungtMJQXotvxasbyeOv5CYgrDvMJNLcrzEfGQ=; b=Vot3nUJBJI4qzbaW9ynu6y9Zh6fEn4O1VHq+ZXDnqp0w4QRQd9nHkfHdwGMBRllXWH zwvRDN01MJGrkZrfvmgag4lAVofyt4YcDbfawqiZorDnQ2j5G8M0oOkW1N2PYzB2JjAv JiGldy3rKfgcvUrL0Do+wkePz29jVP97eEc9w9QTFPVFFcWPLsZUBRhA/p0/Z7v0tJiM KYb8leOduvTNEZXpARYSTssRRp5srszURwd4u7Lh2YpUlTchuJ7POAxWodhORgbh/mrJ hZSm2FfpGlj2JkB6RN4dfXSfpWfjFtYfdoK8r3KzHUKD5un/zA0NYct97ndlYMgfEpI6 mLfw== X-Gm-Message-State: AOPr4FUPf9OP5a8/yHxiKzJi4fgDsA8Ekpr9kY50fox3lc4kBYPvdApT9Swh3NbyvN4BYg== X-Received: by 10.194.61.40 with SMTP id m8mr11252703wjr.106.1461788108709; Wed, 27 Apr 2016 13:15:08 -0700 (PDT) Received: from adeos.localdomain (bgl93-4-82-235-219-60.fbx.proxad.net. [82.235.219.60]) by smtp.gmail.com with ESMTPSA id kz1sm5743668wjc.46.2016.04.27.13.15.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 13:15:07 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Wed, 27 Apr 2016 22:15:01 +0200 Message-Id: <1461788103-12163-1-git-send-email-romain.naour@gmail.com> X-Mailer: git-send-email 2.5.5 Cc: Romain Naour , "Yann E. MORIN" , Thomas De Schampheleire Subject: [Buildroot] [PATCH v4 1/3] toolchain-external: add a check for unsupported toolchains X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some toolchain can't be used by Buildroot due to sysroot location issue, so the $(ARCH)-linux-gnu-gcc -print-file-name=libc.a command return only "libc.a" This lead to an error during the header check version helper, so these toolchains can't be imported into Buildroot. cc1: fatal error: $PWD/libc.a/usr/include/linux/version.h: No such file or directory compilation terminated. support/scripts/check-kernel-headers.sh: line 38: /tmp/check-headers.4V5PPF: Permission denied This issue happen with the first linaro 2015.11 [1] release and CodeSourcery standard edition [2]. Here is the sysroot directory tree for linaro 2015.11: $ ls libc/arm-linux-gnueabihf etc lib sbin usr var Here is the sysroot directory tree for CodeSourcery standard: $ ls libc/sgxx-glibc etc lib lib64 sbin usr var Add a check to error out with an explicit error message The check don't use toolchain_find_libc_a function directly since "realpath -f" is used internally and return an absolute path. [1] https://bugs.linaro.org/show_bug.cgi?id=1995#c7 [2] http://lists.busybox.net/pipermail/buildroot/2014-October/110696.html Signed-off-by: Romain Naour Cc: "Yann E. MORIN" Cc: Arnout Vandecappelle (Essensium/Mind) Cc: Thomas De Schampheleire --- v4: rebase on master v3: rename non_existent_sysroot to libc_a_path (ThomasP) v2: move the check to check_unusable_toolchain helper use unsupported toolchain instead of broken toolchains (ThomasP) --- toolchain/helpers.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index eeac7d2..8aaad67 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -371,6 +371,11 @@ check_unusable_toolchain = \ echo "and contain a lot of pre-built libraries that would conflict with"; \ echo "the ones Buildroot wants to build."; \ exit 1; \ + fi; \ + libc_a_path=`$${__CROSS_CC} -print-file-name=libc.a` ; \ + if test "$${libc_a_path}" = "libc.a" ; then \ + echo "Unable to detect the toolchain sysroot, Buildroot cannot use this toolchain." ; \ + exit 1 ; \ fi #