All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] toolchain-external: add a check for unsupported toolchains
Date: Mon,  1 Feb 2016 14:40:16 +0100	[thread overview]
Message-ID: <1454334017-12326-1-git-send-email-romain.naour@gmail.com> (raw)

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

Usually the sysroot is located directly under libc directory
$ ls libc/
etc  lib  sbin  usr  var

Add a check to error out with an explicit error message

[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 <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
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 02cc0bb..fd99efe 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -418,6 +418,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; \
+	non_existent_sysroot=`$${__CROSS_CC} -print-file-name=libc.a` ; \
+	if test "$${non_existent_sysroot}" = "libc.a" ; then \
+		echo "Unable to detect the toolchain sysroot, Buildroot cannot handle this toolchain." ; \
+		exit 1 ; \
 	fi
 
 #
-- 
2.4.3

             reply	other threads:[~2016-02-01 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 13:40 Romain Naour [this message]
2016-02-01 13:40 ` [Buildroot] [PATCH v2 2/2] toolchain-external: move the sysroot toolchain support check to helper function Romain Naour
2016-02-01 13:43   ` Romain Naour
2016-02-01 14:35   ` Thomas Petazzoni
2016-02-01 14:38 ` [Buildroot] [PATCH v2 1/2] toolchain-external: add a check for unsupported toolchains Thomas Petazzoni
2016-02-01 14:57   ` Romain Naour
2016-02-01 15:47     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454334017-12326-1-git-send-email-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.