Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 7/8] package/autotools: add --{enable, disable}-{shared, static} automatically
Date: Mon, 13 Jun 2011 23:39:41 +0200	[thread overview]
Message-ID: <874o3t9zs2.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110613001630.1281e5c3@skate> (Thomas Petazzoni's message of "Mon, 13 Jun 2011 00:16:30 +0200")

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Le Sun, 12 Jun 2011 21:59:29 +0200,
 Thomas> Peter Korsgaard <jacmet@uclibc.org> a ?crit :

 >> But it does mean that autotools stuff now gets built twice, increasing
 >> the build time..

 Thomas> It's true that I haven't checked the impact on the build time. Does it
 Thomas> really build libraries twice ? Isn't only the link stage performed
 Thomas> twice ?

Yes, in general it needs to build each source file twice because of the
different compiler flags (E.G. -fPIC).

 Thomas> If the impact on the build time is too high, then we could
 Thomas> probably make the static library generation conditional. I
 Thomas> enabled it so that the staging directory contains static
 Thomas> libraries, which allows users to statically link their programs
 Thomas> against some libraries.

Yes, I understand.

I did a quick test with a simple .config with a few libraries:

cat defconfig
BR2_arm=y
BR2_arm926t=y
BR2_JLEVEL=6
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LZO=y
BR2_PACKAGE_LIBFUSE=y
BR2_PACKAGE_FONTCONFIG=y
BR2_PACKAGE_LIBPNG=y
BR2_PACKAGE_LIBCGI=y
BR2_PACKAGE_LIBCURL=y
BR2_PACKAGE_NEON=y
BR2_PACKAGE_LIBRSYNC=y
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_BASH=y

Which I first built normally (a) and then with make
SHARED_STATIC_LIBS_OPTS='--disable-static --enable-shared' (b). The
machine was busy doing other stuff, so you cannot completely trust the
build time numbers, but here they are anyway:

(a):
real    27m14.481s
user    45m4.601s
sys     12m11.738s

(b):
real    28m56.879s
user    44m16.506s
sys     10m56.337s

So no significant difference - B is even slightly slower here. Most of
the time is spent building the toolchain.

A naturally leads to a bit bigger staging though:

du -hs {a,b}/staging/
28M     a/staging/
26M     b/staging/

But it (naturally) doesn't affect the image size:
du -hs {a,b}/images
5.0M    a/images
5.0M    b/images

So I think we should just leave it as it is for now.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2011-06-13 21:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 21:56 [Buildroot] [pull request] Pull request for branch for-2011.08/no-mmu-blackfin Thomas Petazzoni
2011-05-30 21:56 ` [Buildroot] [PATCH 1/8] blackfin: support external toolchains provided by blackfin.uclibc.org Thomas Petazzoni
2011-05-30 21:56 ` [Buildroot] [PATCH 2/8] toolchain: introduce BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS Thomas Petazzoni
2011-05-30 21:56 ` [Buildroot] [PATCH 3/8] busybox: tune config according to BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS Thomas Petazzoni
2011-05-30 21:56 ` [Buildroot] [PATCH 4/8] busybox: adjust configuration for non-MMU targets Thomas Petazzoni
2011-05-30 21:57 ` [Buildroot] [PATCH 5/8] Mark some packages as not usable on non-MMU systems Thomas Petazzoni
2011-06-12 19:55   ` Peter Korsgaard
2011-06-12 22:14     ` Thomas Petazzoni
2011-05-30 21:57 ` [Buildroot] [PATCH 6/8] Remove unused variable definitions Thomas Petazzoni
2011-05-30 21:57 ` [Buildroot] [PATCH 7/8] package/autotools: add --{enable, disable}-{shared, static} automatically Thomas Petazzoni
2011-06-12 19:59   ` Peter Korsgaard
2011-06-12 22:16     ` Thomas Petazzoni
2011-06-13 21:39       ` Peter Korsgaard [this message]
2011-06-14  6:54         ` Thomas Petazzoni
2011-06-15  6:37           ` Peter Korsgaard
2011-06-15  6:47             ` Thomas Petazzoni
2011-06-15  7:09               ` Peter Korsgaard
2011-06-15  7:28               ` ANDY KENNEDY
2011-06-15  7:33                 ` Peter Korsgaard
2011-05-30 21:57 ` [Buildroot] [PATCH 8/8] packages: remove --{enable, disable}-{shared, static} from autotools packages Thomas Petazzoni
2011-06-12 21:06 ` [Buildroot] [pull request] Pull request for branch for-2011.08/no-mmu-blackfin Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o3t9zs2.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox