introduce global control on shared/static libraries
PATCH 1/2 introduce global control on shared/static libraries
This patch adds support for global enabling and disabling of shared or static libraries in autoconf based packages.
All required fixes in packages that I was able to test are already in place with exception of apmd (I plan to commit it soon as well).
classes/base.bbclass +2 -2
@@ -346,10 +346,10 @@ oe_libinstall() { silent=1 ;; -a) - require_static=1 + if test "$enable_static" != "no" ; then require_static=1 ; fi ;; -so) - require_shared=1 + if test "$enable_shared" != "no" ; then require_shared=1 ; fi ;; -*) oefatal "oe_libinstall: unknown option: $1"
conf/bitbake.conf +4 -0
@@ -86,6 +86,10 @@ bindir_cross = "/bin" # target_datadir := "${datadir}" +# Basic autoconf defaults +export enable_static = "yes" +export enable_shared = "yes" + ################################################################## # Architecture-dependent build variables. ##################################################################
conf/local.conf.sample +6 -0
@@ -146,6 +146,12 @@ IMAGE_FSTYPES = "jffs2 tar" # SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}" # LDFLAGS =+ "-pg" +# Uncomment these and define whether you want to build stared and static +# libraries by default. +# Normally the DISTRO of your choosing will take care of this +# export enable_static = "yes" +# export enable_shared = "yes" + # Uncomment this to enable parallel make. # This allows make to spawn mutliple processes to take advantage of multiple # processors. Useful on SMP machines. This may break some packages - we're
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Am Sonntag, den 10.01.2010, 18:06 +0100 schrieb Stanislav Brabec:
[…]
conf/local.conf.sample IMAGE_FSTYPES = "jffs2 tar" · line 150
Quoted 2 lines
conf/local.conf.sample +2
-0+# Uncomment these and define whether you want to build stared and static +# libraries by default.
s/stared/shared/
[…]
Thanks,
Paul
Quoted 5 lines · Stanislav Brabec
This patch adds support for global enabling and disabling of shared or static libraries in autoconf based packages.
All required fixes in packages that I was able to test are already in place with exception of apmd (I plan to commit it soon as well).
I'm not very keen on the names of these configuration variables or the global exports of them. I understand your desire to leverage the existing support in autoconf for taking settings from the environment, but I am not sure that it is wholesome to pollute the global environment for all tasks, including non-autoconf-using ones, with this stuff.
I would suggest something more along the lines of a BITBAKE_LIBRARY_STYLE variable (not exported to the environment), which you can set to "shared", "static" or "both", and then some code in autotools_do_configure() to translate this into the appropriate flags or environment settings for configure.
p.