From owner-freebsd-toolchain@FreeBSD.ORG Thu Apr 26 19:01:40 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6D2F106564A; Thu, 26 Apr 2012 19:01:40 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id EA8AA8FC12; Thu, 26 Apr 2012 19:01:39 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so1677929bkc.13 for ; Thu, 26 Apr 2012 12:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=nb7WDSu21G1M44+Aud+ZPqQwbQ1yZ6bqP6L+tXL10sE=; b=hXHnwL507UrVX/PFVlgnvAA0Y7P6WYHlsYmMO6a6SEnngdtWYl8X37imX9JlXf2ZYV jR/+VSaGbV7nyUks9DWUEq47zeinAiC1++O5YkmMSKCDRfLCoOMHjTVy9YUNnuP+RiXj JAKlTg/WFkEBGdBKMhrjRMjlp/eaO/+bnoDjbQskl6iQXKeyJya+Fc/631JFDWgvmjqU 4mmtjScA+gDwgWX/SfPv/y59Ozo47i6mouxoEcv2pcVR32BtHbS4E4/7JItqcwBZhHah 9prZ3ns2qBHJ8L0VSi5VJNJD6futQ66xQHgB1gwE/oV0fZ6+rReWsD+YraVIGnpSfaEi vxww== Received: by 10.205.132.16 with SMTP id hs16mr2717046bkc.115.1335466898705; Thu, 26 Apr 2012 12:01:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.202.142 with HTTP; Thu, 26 Apr 2012 12:01:08 -0700 (PDT) In-Reply-To: <20120426134140.GF14350@lo0.su> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> From: Chris Rees Date: Thu, 26 Apr 2012 20:01:08 +0100 Message-ID: To: Ruslan Ermilov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: toolchain@freebsd.org, current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:01:40 -0000 On Apr 26, 2012 2:42 PM, "Ruslan Ermilov" wrote: > > On Thu, Apr 26, 2012 at 12:35:48PM +0300, Konstantin Belousov wrote: > > I think it is time to stop building the toolchain static. I was told that > > original reasoning for static linking was the fear of loosing the ability > > to recompile if some problem appears with rtld and any required dynamic > > library. Apparently, current dependencies are much more spread, e.g. /bin/sh > > is dynamically linked, and statically linked make does not solve anything. > > ------------------------------------------------------------------------ > r76801 | sobomax | 2001-05-18 13:05:56 +0400 (Fri, 18 May 2001) | 6 lines > > By default build make(1) as a static binary. It costs only 100k of additional > disk space, buf provides measureable speed increase for make-intensive > operations, such as pkg_version(1), `make world' and so on. > > MFC after: 1 week > > ------------------------------------------------------------------------ > > Have things changed enough that the above is not true anymore? Well, the most make(1)-intensive test I can think of is make index, so some results from a quick test: hydra# uname -a FreeBSD hydra.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #7: Sun Apr 22 21:02:48 BST 2012 root@hydra.bayofrum.net:/usr/obj/usr/src/sys/HYDRA amd64 hydra# cd /usr/src/usr.bin/make && make NO_SHARED=yes && cp make ~/bin/make-static >& /dev/null hydra# rm make && make NO_SHARED=no && cp make ~/bin/make-dynamic >& /dev/null hydra# file ~/bin/make-* /home/chris/bin/make-dynamic: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped /home/chris/bin/make-static: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900044), not stripped hydra# cd /usr/ports && time make MAKE=~crees/bin/make-static index Generating INDEX-9 - please wait.. Done. 729.770u 120.841s 7:45.10 182.8% 920+2676k 5251+116484io 7750pf+0w hydra# time make MAKE=~crees/bin/make-dynamic index Generating INDEX-9 - please wait.. Done. 771.320u 133.540s 8:07.83 185.4% 609+2918k 474+116484io 570pf+0w We have a 10% slowdown (or 11% speedup, depending on your figures) when using a dynamically loaded make. Chris