From patchwork Sun Oct 13 14:55:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 283094 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 EB55D2C0126 for ; Mon, 14 Oct 2013 01:59:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2B66687F13; Sun, 13 Oct 2013 14:59:25 +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 dWfJsyne8tpK; Sun, 13 Oct 2013 14:59:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B1D9C896A9; Sun, 13 Oct 2013 14:59:21 +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 0123E1BF975 for ; Sun, 13 Oct 2013 14:59:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EE7A98B150 for ; Sun, 13 Oct 2013 14:59:18 +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 g4hbJlaO2CyX for ; Sun, 13 Oct 2013 14:59:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4D3398AB83 for ; Sun, 13 Oct 2013 14:59:17 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id g10so2869236eak.4 for ; Sun, 13 Oct 2013 07:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to:cc; bh=Uh7et3AGV7I6otvCMz2CO6/aZKvsYHrteBofRpVuXLI=; b=an5EmNVvK4OXqeKOzGVk+tGXF1+J12SGoUxkJ5pSaNk5EEtcpE9jy2mFiE9HotzkCc S77ILmMT2dpwD9YUYuzAnfqEv1Tff0cwzt6BuV9W09ayuuguMC16DvAXwod7QMwcrqO9 MRuKiUSdCB32pJTH6JBitf1FQ90pGQgDIsDgSyLaoYjGV1KS+KvG8v6n5bIXcJzC0MvZ oudRzQtnn+jZA1n3SqHKLIXv1DWy9kyDLdQHjyCKNDKxlC+bVwPW1I/PFnXPGbsgEctH L8g8W2RGdC/XrkXI4B2AEDXANB2+lR6SJcGPzlL9+OaOAcTWMhoNuJefCC09lr+Ws+g3 xWLg== X-Received: by 10.14.241.74 with SMTP id f50mr48358303eer.29.1381676355918; Sun, 13 Oct 2013 07:59:15 -0700 (PDT) Received: from [127.0.1.1] (d54C62EEB.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id j7sm141400827eeo.15.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Oct 2013 07:59:14 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 21b9bd1f7132d7e17e8a0f75683df4113db244be Message-Id: <21b9bd1f7132d7e17e8a.1381676131@argentina> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Sun, 13 Oct 2013 16:55:31 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net, jacmet@uclibc.org Cc: thomas.petazzoni@free-electrons.com Subject: [Buildroot] [PATCH 1 of 2 v3] manual: add section about depending on target and toolchain options 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Currently, the comments in Config.in files when depending on toolchain options are not at all lined up. This patch adds a section to the documentation that explains which format is to be used. Signed-off-by: Thomas De Schampheleire --- v3: - incorporate Arnout's comments - add (e)glibc text to documentation (previously mentioned as 'to be decided') v2: - explicitly add parts on target architecture and MMU support (no comment needed) (comment ThomasP) - remove 'without scrolling' text (comment Arnout) docs/manual/adding-packages-directory.txt | 90 ++++++++++++++++++++++++-- 1 files changed, 82 insertions(+), 8 deletions(-) diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt --- a/docs/manual/adding-packages-directory.txt +++ b/docs/manual/adding-packages-directory.txt @@ -70,13 +70,9 @@ rules: * Use a +depends on+ type of dependency when the user really needs to be aware of the dependency. Typically, Buildroot uses this type of - dependency for dependencies on toolchain options (target - architecture, MMU support, C library, C++ support, large file - support, thread support, RPC support, IPV6 support, WCHAR support), - or for dependencies on "big" things, such as the X.org system. For - dependencies on toolchain options, there should be a +comment+ that - is displayed when the option is not - enabled, so that the user knows why the package is not available. + dependency for dependencies on target architecture, MMU support and + toolchain options (see xref:dependencies-target-toolchain-options[]), + or for dependencies on "big" things, such as the X.org system. The +depends on+ keyword expresses the dependency with a forward semantic. @@ -101,7 +97,7 @@ config BR2_PACKAGE_ACL http://savannah.nongnu.org/projects/acl -comment "acl requires a toolchain with LARGEFILE support" +comment "acl needs a toolchain w/ largefile" depends on !BR2_LARGEFILE -------------------------- @@ -167,6 +163,84 @@ package. Further formatting details: see xref:writing-rules-config-in[the coding style]. +[[dependencies-target-toolchain-options]] +Dependencies on target and toolchain options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Many packages depend on certain options of the toolchain: the choice of +C library, C++ support, largefile support, thread support, RPC support, +IPv6 support, wchar support, or dynamic library support. Some packages +can only be built on certain target architectures, or if an MMU is +available in the processor. +These dependencies have to expressed with the appropriate 'depends on' +statements in the Config.in file. Additionally, for dependencies on +toolchain options, a +comment+ should be displayed when the option is +not enabled, so that the user knows why the package is not available. +Dependencies on target architecture or MMU support should not be +made visible in a comment: since it is unlikely that the user can +freely choose another target, it makes little sense to show these +dependencies explicitly. + +The general format of a dependency +comment+ for package foo is: +-------------------------- +foo needs a toolchain w/ featA, featB, featC +-------------------------- + +for example: +-------------------------- +aircrack-ng needs a toolchain w/ largefile, threads +-------------------------- + +Note that this text is kept brief on purpose, so that it will fit on a +80-character terminal. + +The rest of this section enumerates the different target and toolchain +options, the corresponding config symbols to depend on, and the text to +use in the comment. + +* Target architecture +** Dependency symbol: +BR2_powerpc+, +BR2_mips+, ... (see +arch/Config.in+) +** Comment string: no comment to be added + +* MMU support +** Dependency symbol: +BR2_USE_MMU+ +** Comment string: no comment to be added + +* C library +** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+, ++BR2_TOOLCHAIN_USES_UCLIBC+ +** Comment string: for the C library, a slightly different comment text + is used: +foo needs an (e)glibc toolchain+, or `foo needs an (e)glibc + toolchain w/ C++ support` + +* C++ support +** Dependency symbol: +BR2_INSTALL_LIBSTDCPP+ +** Comment string: `C++` + +* largefile support +** Dependency symbol: +BR2_LARGEFILE+ +** Comment string: +largefile+ + +* thread support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS+ +** Comment string: +threads+ + +* RPC support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_NATIVE_RPC+ +** Comment string: +RPC+ + +* IPv6 support +** Dependency symbol: +BR2_INET_IPV6+ +** Comment string: +IPv6+ (lowercase v) + +* wchar support +** Dependency symbol: +BR2_USE_WCHAR+ +** Comment string: +wchar+ + +* dynamic library +** Dependency symbol: +!BR2_PREFER_STATIC_LIB+ +** Comment string: +dynamic library+ + + The +.mk+ file ~~~~~~~~~~~~~~ [[adding-packages-mk]]