|author||Sonic Zhang <firstname.lastname@example.org>||2015-03-27 22:10:23 +0100|
|committer||Thomas Petazzoni <email@example.com>||2015-03-30 23:07:48 +0200|
arch: BINFMT_FLAT_SHARED is not really shared for buildroot purposes
Although BINFMT_FLAT_SHARED is indeed a shared library format, it does not support dynamic library loading with dlopen(). So for buildroot purposes, BR2_STATIC_LIBS shouldn't be selected. As it happens, the compiler options that are added for BINFMT_FLAT_SHARED also make the compiler ignore the -static option, so we can simply force BR2_STATIC_LIBS and things work out perfectly. Therefore, remove the select of BR2_BINFMT_SUPPORTS_SHARED from BINFMT_FLAT_SHARED, which in turn makes sure that BR2_STATIC_LIBS is selected. [Arnout: rewrite commit message, add explanatory comment] Signed-off-by: Sonic Zhang <firstname.lastname@example.org> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <email@example.com> Signed-off-by: Thomas Petazzoni <firstname.lastname@example.org>
Diffstat (limited to 'arch')
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/Config.in b/arch/Config.in
index 16ad8be56b..59bf84a918 100644
@@ -295,7 +295,12 @@ config BR2_BINFMT_FLAT_SEP_DATA
bool "Shared binary"
- select BR2_BINFMT_SUPPORTS_SHARED
+ # Even though this really generates shared binaries, there is no libdl
+ # and dlopen() cannot be used. So packages that require shared
+ # libraries cannot be built. Therefore, we don't select
+ # BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS.
+ # Although this adds -static to the compilation, that's not a problem
+ # because the -mid-shared-library option overrides it.
Allow to load and link indiviual FLAT binaries at run time.