From patchwork Fri Mar 27 21:10:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 455580 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 6C2D714012C for ; Sat, 28 Mar 2015 08:10:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 77AEEA3978; Fri, 27 Mar 2015 21:10:33 +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 ds3q6cCUJeHW; Fri, 27 Mar 2015 21:10:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1A74EA3803; Fri, 27 Mar 2015 21:10:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 96AF61BF974 for ; Fri, 27 Mar 2015 21:10:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 933A995587 for ; Fri, 27 Mar 2015 21:10:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tdGCHi6GfaDQ for ; Fri, 27 Mar 2015 21:10:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by hemlock.osuosl.org (Postfix) with ESMTPS id 04DB7930E7 for ; Fri, 27 Mar 2015 21:10:29 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1YbbWM-00039X-Hw; Fri, 27 Mar 2015 22:10:26 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.84) (envelope-from ) id 1YbbWK-0006KS-Nj; Fri, 27 Mar 2015 22:10:24 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Fri, 27 Mar 2015 22:10:23 +0100 Message-Id: <1427490623-24292-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.1.4 Cc: Sonic Zhang Subject: [Buildroot] [PATCH v3] BINFMT_FLAT_SHARED: is not really shared for buildroot purposes 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" From: Sonic Zhang Although BINFMT_FLAT_SHARED is indeed a shared library format, it does not support dynamic library loading with dlopen(). So for buildroot purposes, BR2_STATIC_LIBS shouldn't be selected. As it happens, the compiler options that are added for BINFMT_FLAT_SHARED also make the compiler ignore the -static option, so we can simply force BR2_STATIC_LIBS and things work out perfectly. Therefore, remove the select of BR2_BINFMT_SUPPORTS_SHARED from BINFMT_FLAT_SHARED, which in turn makes sure that BR2_STATIC_LIBS is selected. [Arnout: rewrite commit message, add explanatory comment] Signed-off-by: Sonic Zhang Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- v3 (Arnout): Remove accidentally added unrelated part. v2 (Arnout): rewrite commit message, add explanatory comment. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- arch/Config.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/Config.in b/arch/Config.in index 16ad8be..59bf84a 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -295,7 +295,12 @@ config BR2_BINFMT_FLAT_SEP_DATA config BR2_BINFMT_FLAT_SHARED bool "Shared binary" - select BR2_BINFMT_SUPPORTS_SHARED + # Even though this really generates shared binaries, there is no libdl + # and dlopen() cannot be used. So packages that require shared + # libraries cannot be built. Therefore, we don't select + # BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS. + # Although this adds -static to the compilation, that's not a problem + # because the -mid-shared-library option overrides it. help Allow to load and link indiviual FLAT binaries at run time.