aboutsummaryrefslogtreecommitdiff
path: root/Config.in
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-12-11 23:50:09 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-12-12 00:09:02 +0100
commit158001f57b47a3fb439ad9093b6703c7edf3f842 (patch)
tree53b850faa2f31abe64a72276a5a99ba37fcd7ea1 /Config.in
parent6e2b80968f59bb78bda199b89a8eaac5931454e7 (diff)
downloadbuildroot-158001f57b47a3fb439ad9093b6703c7edf3f842.tar.gz
buildroot-158001f57b47a3fb439ad9093b6703c7edf3f842.tar.bz2
Turn the static lib option into a choice with more options
This commit turns the single static option into a choice, which offers various possibilities: 1. Build and use static libraries only; 2. Build both shared and static libraries, but use shared libraries; 3. Build and use shared libraries only. On most platforms, (2) is currently the default, and kept as the default in this commit. Of course, on certain platforms (Blackfin, m68k), only option (1) will be available. In addition to the introduction of the Config.in options, this commit also: * Removes the 'select BR2_STATIC_LIBS' from 'BR2_BINFMT_FLAT', since with the use of a choice, we are guaranteed that BR2_STATIC_LIBS will be selected when the binary format is BR2_BINFMT_FLAT, since BR2_STATIC_LIBS will be the only possible solution in the choice. * Changes package/Makefile.in to use the proper --{enable,disable}-{shared,static} options for autotools packages. [Thomas: remove useless empty newline right after 'choice'. Noticed by Yann E. Morin.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'Config.in')
-rw-r--r--Config.in44
1 files changed, 35 insertions, 9 deletions
diff --git a/Config.in b/Config.in
index cdc5f0f9fa..45921398dc 100644
--- a/Config.in
+++ b/Config.in
@@ -525,19 +525,45 @@ config BR2_ENABLE_SSP
comment "enabling Stack Smashing Protection requires support in the toolchain"
depends on !BR2_TOOLCHAIN_HAS_SSP
+choice
+ bool "libraries"
+ default BR2_SHARED_STATIC_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.
+
+ The default is to build dynamic libraries and use those on
+ the target filesystem, except when the architecture and/or
+ the selected binary format does not support shared
+ libraries.
+
config BR2_STATIC_LIBS
- bool "build statically linked applications, no dynamic libraries"
+ bool "static only"
help
- Build all applications for the target statically linked.
- This potentially increases your filesystem size and should only be
- used if you know what you do.
+ Build and use only static libraries. No shared libraries
+ will be instaled on the target. This potentially increases
+ your code size and should only be used if you know what you
+ are doing. Note that some packages may not be available when
+ this option is enabled, due to their need for dynamic
+ library support.
- Note that some applications cannot be build statically and so are
- intentionally disabled.
+config BR2_SHARED_LIBS
+ bool "shared only"
+ depends on BR2_BINFMT_SUPPORTS_SHARED
+ help
+ Build and use only shared libraries. This is the recommended
+ solution as it saves space and build time.
+
+config BR2_SHARED_STATIC_LIBS
+ bool "both static and shared"
+ depends on BR2_BINFMT_SUPPORTS_SHARED
+ help
+ Build both shared and static libraries, but link executables
+ dynamically. While building both shared and static libraries
+ take more time and more disk space, having static libraries
+ may be useful to link some of the applications statically.
- The default (if this option is disabled) is to build dynamic
- libraries and dynamically link applications to use those on the
- target filesystem.
+endchoice
config BR2_PACKAGE_OVERRIDE_FILE