From patchwork Tue Jun 21 17:36:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Hunleth X-Patchwork-Id: 638800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rYw024sX5z9sDG for ; Wed, 22 Jun 2016 03:37:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=troodon-software-com.20150623.gappssmtp.com header.i=@troodon-software-com.20150623.gappssmtp.com header.b=1Qac3jb+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 59028C0558; Tue, 21 Jun 2016 17:37:04 +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 PHbf_vVKgPRE; Tue, 21 Jun 2016 17:37:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 47163C054B; Tue, 21 Jun 2016 17:37:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8D8951C162F for ; Tue, 21 Jun 2016 17:37:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8C3E58857B for ; Tue, 21 Jun 2016 17:37:02 +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 V31Jz-rexLFZ for ; Tue, 21 Jun 2016 17:37:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id DCC488B131 for ; Tue, 21 Jun 2016 17:37:01 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id b136so4409474qkg.2 for ; Tue, 21 Jun 2016 10:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troodon-software-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=l+2mAbELy9VRPGpIImyvzECqDeszKnT+bQJ4+JftBds=; b=1Qac3jb+gp0cQJDIpugrwtuSddHTMiGZdY3mNkXXANsXbTuxVqtUTKJvhoiW5JT3kx igPwyFjFN2SIftBRJ19032FAqjMvek0/vojZ05vnWteWVnKkzFt9hYC88wkSgWdmSet9 mMdBNHc44CHuGTn+paY0KPhdS3z3XNaKJpx9Qc4mt6qLn3Pmp26hDsbuuIwxOX6+DHqw km/USLidogV9WtcmpPTLmRAXHmQhb3CqZjyQgIgFGG0lM7PHIyJN0tH9TyBTm3cfD2rx 9xgYvS1D52aKLIAhAC67vy2+fbbpjHCVcrnbjRyMxDj9P+RmpHgBIkFUimQZwlV4WWYO mkPw== 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=l+2mAbELy9VRPGpIImyvzECqDeszKnT+bQJ4+JftBds=; b=kbivg6VwU1DdqTMjLOchMAAgKPZK5qWLmttyvHyawcuCLoB/MYOgDuj56aAnX27mZs iuYqgdyL1FMQBw4hbc4xgTWtptM+/habpmicFmc2GhjGhf2FiCdgEYVsLmtkuoGM5FK5 0FogkGGVLUCVgnGGY98UsJ7tPAfrCLDBkAT0+BLljAZEf1FUVfiL80/lFEVc+SXReZ5T moJuysJ3TyDKlpKuuYK5Z8LwDHDNrcZwMEB1z4PbJNae64PqVdCWdRWgEbXWM8Su86ZE kriKcbdklLsCi/uXLkR3WZHUgcl4nWDfQtjEw6Kh1FuVVfa2YqiQMGJtc6SyKQlj4hA8 qTPw== X-Gm-Message-State: ALyK8tIAdAJz63N7xIQy1NcYXMcecaQjJxVTfc6scKh/GePahyTx/hqQxVbYzqvsOqcllg== X-Received: by 10.55.176.130 with SMTP id z124mr24490563qke.55.1466530620977; Tue, 21 Jun 2016 10:37:00 -0700 (PDT) Received: from halfmarathon.home.hunleth.com (pool-100-36-100-112.washdc.fios.verizon.net. [100.36.100.112]) by smtp.gmail.com with ESMTPSA id n63sm3427764qkd.16.2016.06.21.10.37.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jun 2016 10:37:00 -0700 (PDT) From: Frank Hunleth To: buildroot@buildroot.org Date: Tue, 21 Jun 2016 13:36:43 -0400 Message-Id: <1466530603-6041-1-git-send-email-fhunleth@troodon-software.com> X-Mailer: git-send-email 2.5.0 Subject: [Buildroot] [PATCH 1/1] toolchain: allow crosstool-ng musl 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" Currently, if using a crosstool-ng-generated external musl toolchain, Buildroot exits with "Incorrect selection of the C library". The musl.codu.org cross-compilers put their libraries in /lib while crosstool-ng uses /usr/lib. This change checks that location for libc.so as well. Signed-off-by: Frank Hunleth --- To test, create a crosstool-ng musl toolchain or use one that I built. For the latter, modify qemu_mipsel_malta_defconfig with the following: BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/nerves-project/nerves-toolchain/releases/download/v0.6.3/nerves-mipsel-unknown-linux-musl-linux-x86_64-v0.6.3.tar.xz" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="mipsel-unknown-linux-musl" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y # BR2_TOOLCHAIN_EXTERNAL_HAS_SSP is not set BR2_TOOLCHAIN_EXTERNAL_CXX=y toolchain/helpers.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.5.0 diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 108fdaa..9a41bd6 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -210,7 +210,7 @@ check_glibc = \ # $1: sysroot directory check_musl = \ SYSROOT_DIR="$(strip $1)"; \ - if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ + if test ! \( -f $${SYSROOT_DIR}/lib/libc.so -o -f $${SYSROOT_DIR}/usr/lib/libc.so \) -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ echo "Incorrect selection of the C library" ; \ exit -1; \ fi