mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-27 15:33:28 +08:00
package/pkg-meson: support building both libraries
meson supports building both libraries (i.e. static and shared). This will avoid the following build failure with flashrom and BR2_SHARED_STATIC_LIBS raised since bump to version 1.4.0-rc2 in commit8637884057
: ../output-1/build/flashrom-1.4.0-rc2/meson.build:18:2: ERROR: Problem encountered: Cannot build cli_classic with shared libflashrom. Use \'-Dclassic_cli=disabled\' to disable the cli, or use \'--default-library=both\' to also build the classic_cli Fixes:8637884057
- http://autobuild.buildroot.org/results/6d484857ff1674bf81986505827e54f3f1b9aaec Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
ec052de2fb
commit
f40757781f
@ -82,6 +82,14 @@ else
|
||||
PKG_MESON_TARGET_FC = /bin/false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
PKG_MESON_DEFAULT_LIBRARY=static
|
||||
else ifeq ($(BR2_SHARED_LIBS),y)
|
||||
PKG_MESON_DEFAULT_LIBRARY=shared
|
||||
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
||||
PKG_MESON_DEFAULT_LIBRARY=both
|
||||
endif
|
||||
|
||||
# Generates sed patterns for patching the cross-compilation.conf template,
|
||||
# since Flags might contain commas the arguments are passed indirectly by
|
||||
# variable name (stripped to deal with whitespaces).
|
||||
@ -152,7 +160,7 @@ define $(2)_CONFIGURE_CMDS
|
||||
$$(MESON) setup \
|
||||
--prefix=/usr \
|
||||
--libdir=lib \
|
||||
--default-library=$(if $(BR2_STATIC_LIBS),static,shared) \
|
||||
--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
|
||||
--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
|
||||
--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
|
||||
-Db_pie=false \
|
||||
|
Loading…
Reference in New Issue
Block a user