From patchwork Sun Jul 13 18:45:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 369435 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6EC0014010B for ; Mon, 14 Jul 2014 04:46:37 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 30B3589199; Sun, 13 Jul 2014 18:46:36 +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 oaFnSwnmek6C; Sun, 13 Jul 2014 18:46:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 41BC389169; Sun, 13 Jul 2014 18:46:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 46F241C2808 for ; Sun, 13 Jul 2014 18:46:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 43C8C8AB3B for ; Sun, 13 Jul 2014 18:46:30 +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 sdOeTvpejjtW for ; Sun, 13 Jul 2014 18:46:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by whitealder.osuosl.org (Postfix) with ESMTPS id C5E9E8AB72 for ; Sun, 13 Jul 2014 18:46:28 +0000 (UTC) Received: from localhost.localdomain (unknown [81.57.22.125]) by smtp1-g21.free.fr (Postfix) with ESMTP id 59EF8940175; Sun, 13 Jul 2014 20:46:26 +0200 (CEST) From: Romain Naour To: buildroot@buildroot.net Date: Sun, 13 Jul 2014 20:45:59 +0200 Message-Id: <1405277160-4686-3-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405277160-4686-1-git-send-email-romain.naour@openwide.fr> References: <1405277160-4686-1-git-send-email-romain.naour@openwide.fr> Subject: [Buildroot] [PATCH 2/3] toolchain-external: handle a special case where glibc check needs TOOLCHAIN_EXTERNAL_CFLAGS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net With the Sourcery Codebench standard edition, the sysroot returned point to a non existant directory if no CFLAGS are specified. Add a test to use ARCH_SYSROOT_DIR for glibc check if SYSROOT_DIR is not a directory. Signed-off-by: Romain Naour --- toolchain/toolchain-external/toolchain-external.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 8280b84..f6e51a1 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -477,7 +477,11 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \ $(call check_musl,$${SYSROOT_DIR}) ; \ else \ - $(call check_glibc,$${SYSROOT_DIR}) ; \ + if test -d "$${SYSROOT_DIR}" ; then \ + $(call check_glibc,$${SYSROOT_DIR}) ; \ + else \ + $(call check_glibc,$${ARCH_SYSROOT_DIR}) ; \ + fi \ fi endef