From patchwork Fri Sep 2 21:57:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 665355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sQtNp6kJZz9sD5 for ; Sat, 3 Sep 2016 08:00:58 +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=weX25CLR; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfwTj-0004DY-E7; Fri, 02 Sep 2016 21:58:27 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfwTf-0004An-LU for lede-dev@lists.infradead.org; Fri, 02 Sep 2016 21:58:24 +0000 Received: by mail-pa0-x241.google.com with SMTP id ez1so5981265pab.3 for ; Fri, 02 Sep 2016 14:58:03 -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=Ol25kfwdGgVHJPtc6MafPkkaU4yRFerlkIyWuKWnJds=; b=weX25CLRQdC9VP/7VKzj/Astiqk3nZUAp1fhbmUAMrvT7y9bXHqaApMxUnCdfKnKj8 87YOLjsfjJ0dOChxL6+QMZF5SuN7IiUNQ/OTwWUW7Hclkjh6yJqxdr82PL4a2VWOd3KK gabAcDcNuPU3r6GBH0XR/QQiKZ2Y5M7DH5G6qkeHWwaP5xNfIxkjxJi/Lus3utBx8ByX NK0+APWBVqIICftQjpewffN1ZkTKRy98wfQGppZmpVMMCnGcXQKHcvXxa2HojUsRjZms oMKfPbqrp4XlsKKlPWONLc7UAVIc6+YI2o2tqrUZZYHGij3yWj1O5CRhvHUsUKuXyxPW iMCg== 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=Ol25kfwdGgVHJPtc6MafPkkaU4yRFerlkIyWuKWnJds=; b=JZcjzNWMTq+eJfel+YIgzIS9B+oA43PwmGSyphVp0pPLCeXyjKbd8qvjZo0qg4L9CX avkenYob4IOi3jGFWIN9vWIY2KFk7FqcYxN9Ba8vprs8d9/rcJRjGmaIgVgVFcJoLvPq cz+dklvNeR6EU04zrC/t2J2zPRmLpCibuafssqcPyG4aeahfzHNclkk7c35E1WAodeCK wMzLtKFU+09h9P/yDVyktov7DSieYB+uL7WpnX0XmqjRfaWLiW05XMP94TjhmGw5WV/s G1Xh/QsVX8Ey0fj1Y5Er1HtwQjcHIRekGSascQ+30ZDF9e9IY35ikQfW+f+WouwQJGkh Zn0A== X-Gm-Message-State: AE9vXwNYQRx1r74eii4dImPwHgVxGi/M1iYCWy+KSoHqFkVTvaJrry6s/1iCxjnti9VMgQ== X-Received: by 10.67.8.41 with SMTP id dh9mr17680323pad.132.1472853482960; Fri, 02 Sep 2016 14:58:02 -0700 (PDT) Received: from stb-bld-03.irv.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by smtp.gmail.com with ESMTPSA id p64sm17029211pfd.11.2016.09.02.14.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Sep 2016 14:58:02 -0700 (PDT) From: Florian Fainelli To: lede-dev@lists.infradead.org Date: Fri, 2 Sep 2016 14:57:58 -0700 Message-Id: <20160902215758.26397-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160902_145823_795010_747F4E98 X-CRM114-Status: GOOD ( 11.79 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH] toolchain: Rework external toolchain libc selection X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Make it a choice menu which offers the 3 C libraries we know about: glibc, uClibc and musl. While at it, make it possible for the external toolchain libc to select USE_GLIBC, USE_UCLIBC or USE_MUSL which is used by several packages to conditionally include specific CFLAGS (e.g: iproute2). Because USE_GLIBC et al. can now be selected by external toolchains, we need to restrict the per-libc menus to check on !EXTERNAL_TOOLCHAIN. Signed-off-by: Florian Fainelli --- toolchain/Config.in | 22 +++++++++++++++++++--- toolchain/glibc/Config.in | 2 +- toolchain/uClibc/Config.in | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/toolchain/Config.in b/toolchain/Config.in index 75dc5361a682..8bb2d9be51e2 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -96,17 +96,33 @@ menuconfig EXTERNAL_TOOLCHAIN default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64 - config TOOLCHAIN_LIBC - string + choice TOOLCHAIN_LIBC prompt "Toolchain libc" if DEVEL depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "uclibc" + default EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC help Specify the libc type used by the external toolchain. The given value is passed as -m flag to all gcc and g++ invocations. This is mainly intended for multilib toolchains which support glibc and uclibc at the same time. If no value is specified, no -m flag is passed. + config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC + bool "glibc" + select USE_GLIBC + + config EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC + bool "uClibc" + select USE_UCLIBC + depends on !(aarch64 || aarch64_be) + + config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL + bool "musl" + select USE_MUSL + depends on BROKEN + depends on !(mips64 || mips64el) + + endchoice + config TOOLCHAIN_BIN_PATH string prompt "Toolchain program path" if DEVEL diff --git a/toolchain/glibc/Config.in b/toolchain/glibc/Config.in index 036604f4a7c0..5adbeb6f8245 100644 --- a/toolchain/glibc/Config.in +++ b/toolchain/glibc/Config.in @@ -1,6 +1,6 @@ choice prompt "glibc version" - depends on TOOLCHAINOPTS && USE_GLIBC + depends on TOOLCHAINOPTS && USE_GLIBC && !EXTERNAL_TOOLCHAIN default GLIBC_USE_VERSION_2_24 help Select the version of glibc you wish to use. diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in index 5793bb779f5c..3bcb0037e9f6 100644 --- a/toolchain/uClibc/Config.in +++ b/toolchain/uClibc/Config.in @@ -2,5 +2,5 @@ config UCLIBC_ENABLE_DEBUG bool "Build with debug information" - depends on TOOLCHAINOPTS && USE_UCLIBC + depends on TOOLCHAINOPTS && USE_UCLIBC && !EXTERNAL_TOOLCHAIN default n