From patchwork Thu Dec 11 22:50: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: 420275 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 CC52814010F for ; Fri, 12 Dec 2014 09:50:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1A43833FEA; Thu, 11 Dec 2014 22:50:33 +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 AGuXCZIC2C8z; Thu, 11 Dec 2014 22:50:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E67FA3400D; Thu, 11 Dec 2014 22:50:21 +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 3F88C1BFA34 for ; Thu, 11 Dec 2014 22:50:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3C77695EF6 for ; Thu, 11 Dec 2014 22:50:16 +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 BNE4QkUhla+q for ; Thu, 11 Dec 2014 22:50:15 +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 hemlock.osuosl.org (Postfix) with ESMTP id 6A10795ED9 for ; Thu, 11 Dec 2014 22:50:15 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 5B989671; Thu, 11 Dec 2014 23:50:15 +0100 (CET) Received: from localhost (AToulouse-657-1-975-244.w109-223.abo.wanadoo.fr [109.223.157.244]) by mail.free-electrons.com (Postfix) with ESMTPSA id 17CD55E0; Thu, 11 Dec 2014 23:50:15 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Thu, 11 Dec 2014 23:50:11 +0100 Message-Id: <1418338211-1595-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1418338211-1595-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1418338211-1595-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCHv2 3/3] Build shared libraries only as the default 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" Now that we have more options in terms of static/shared libraries, switch from the existing default of building both shared and static libraries to building shared libraries only (of course only on platforms that support shared libraries). Building both shared and static takes time (since the shared objects must be built with -fPIC, while static objects are generally built without, as -fPIC has some performance impact) and consumes a little bit more disk space. For example, a static+shared build of libglib2 takes 1 minutes and 59 seconds, with a final build directory of 96 MB. A shared-only build of libglib2 takes only 1 minutes and 31 seconds (almost a 25% reduction of the build time), and the final build directory weights 89 MB (a reduction of almost 8%). So, switching to a shared library only build brings some useful build time and build size benefits. Signed-off-by: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.in b/Config.in index a647283..53142ce 100644 --- a/Config.in +++ b/Config.in @@ -528,7 +528,7 @@ comment "enabling Stack Smashing Protection requires support in the toolchain" choice bool "libraries" - default BR2_SHARED_STATIC_LIBS if BR2_BINFMT_SUPPORTS_SHARED + default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED help Select the type of libraries you want to use on the target.