From patchwork Thu Nov 20 10:25:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 412634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 6F64F14017B for ; Thu, 20 Nov 2014 21:27:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B928A33303; Thu, 20 Nov 2014 10:27:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25L5Okq19pc0; Thu, 20 Nov 2014 10:27:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2A41933317; Thu, 20 Nov 2014 10:27:37 +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 1A5981C26F9 for ; Thu, 20 Nov 2014 10:27:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 10CF192BCB for ; Thu, 20 Nov 2014 10:27:36 +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 77bO2Bqg2ZRw for ; Thu, 20 Nov 2014 10:27:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by whitealder.osuosl.org (Postfix) with ESMTP id BEF98916AA for ; Thu, 20 Nov 2014 10:27:34 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 8951B2F3; Thu, 20 Nov 2014 11:27:37 +0100 (CET) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 48FE3319; Thu, 20 Nov 2014 11:25:17 +0100 (CET) Date: Thu, 20 Nov 2014 11:25:11 +0100 From: Thomas Petazzoni To: Baruch Siach Message-ID: <20141120112511.38477b25@free-electrons.com> In-Reply-To: References: Organization: Free Electrons X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Cc: buildroot@busybox.net, Sonic Zhang Subject: Re: [Buildroot] [PATCH] arch/Config.in: Drop unused BR2_BINFMT_ELF 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Dear Baruch Siach, On Thu, 20 Nov 2014 11:37:19 +0200, Baruch Siach wrote: > The BR2_BINFMT_ELF symbol (introduced in commit 57133825c930) can't possibly > be selected because it depends on (!BR2_bfin && !BR2_m68k), while the > surrounding choice depends on (BR2_bfin || BR2_m68k). This symbol is never > used. > > Cc: Sonic Zhang > Cc: Thomas Petazzoni > Signed-off-by: Baruch Siach > --- > arch/Config.in | 8 -------- > 1 file changed, 8 deletions(-) Well, it's true that it's never selected today. However, it can be useful in a number of situations, with some changes: better support for static/shared library selection, support for ARM noMMU, etc. For example, I have one commit in one of my branches that does this: commit f31d45345e3e260b2942324e43b0a366ec279007 Author: Thomas Petazzoni Date: Sat Sep 21 07:31:07 2013 +0200 arch: ensure BR2_BINFMT_ELF is really used Currently, the binary format choice is only shown for the Blackfin and m68k architectures, since we assume that all other architectures are using the ELF binary format. However, due to this, the BR2_BINFMT_ELF symbol is in fact not set to 'y' for those architectures that use the ELF format. This will be causing problems for the refactoring of the static/shared library support, as we will need to know if the binary format supports shared libraries or not. Therefore, it moves out the BR2_BINFMT_ELF option outside of the choice, ensures it is enabled on all architectures but Blackfin and m68k, and turns the option within the choice into BR2_BINFMT_ELF_CHOICE (but in fact this option can never be seen at the moment, since it depends on !blackfin && !m68k, but the choice it self depends on blackfin || m68k). Signed-off-by: Thomas Petazzoni However, I'm fine with BR2_BINFMT_ELF being removed for now, and re-added later when actually needed. Best regards, Thomas diff --git a/arch/Config.in b/arch/Config.in index 204b543..0a4d36d 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -225,15 +225,20 @@ config BR2_GCC_TARGET_FLOAT_ABI config BR2_GCC_TARGET_MODE string +config BR2_BINFMT_ELF + bool + default y if !BR2_bfin && !BR2_m68k + # Set up target binary format choice prompt "Target Binary Format" depends on BR2_bfin || BR2_m68k default BR2_BINFMT_FDPIC -config BR2_BINFMT_ELF +config BR2_BINFMT_ELF_CHOICE bool "ELF" depends on !BR2_bfin && !BR2_m68k + select BR2_BINFMT_ELF help ELF (Executable and Linkable Format) is a format for libraries and executables used across different architectures and operating