a1cf3b7942
Add patch from upstream commit 30159aea4b3f6421da9d74a8bf22aad6d3bf26b4 to fix musl build issue: src/Error.cpp: In static member function 'static std::string Poco::Error::getMessage(int)': src/Error.cpp:71:55: error: invalid conversion from 'int' to 'const char*' [-fpermissive] return std::string(strerror_r(errorCode, errmsg, 256)); There are 2 flavors of `strerror_r`, a GNU which returns a string and a POSIX version which returns an int. When the POSIX and GNU API collides musl always provides the POSIX API. That being the case for `strerror_r` musl does only support the POSIX version, despite of `_GNU_SOURCE`. Only use the GNU version for glibc or uClibc. Fixes: http://autobuild.buildroot.net/results/cc3/cc392a6e294b9eed697b205329f8146a28e423e2/ http://autobuild.buildroot.net/results/693/693ef640a95702b20eb4e811936510e0a58cdfdd/ http://autobuild.buildroot.net/results/7f0/7f0966ee57aea574fda2157562e9c3202bd3819d/ http://autobuild.buildroot.net/results/7c0/7c02072a885a874e8b640905ef21929e6e143aae/ Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
78 lines
2.3 KiB
Makefile
78 lines
2.3 KiB
Makefile
################################################################################
|
|
#
|
|
# poco
|
|
#
|
|
################################################################################
|
|
|
|
POCO_VERSION = poco-1.7.2-release
|
|
POCO_SITE = $(call github,pocoproject,poco,$(POCO_VERSION))
|
|
POCO_LICENSE = Boost-v1.0
|
|
POCO_LICENSE_FILES = LICENSE
|
|
POCO_INSTALL_STAGING = YES
|
|
POCO_PATCH = https://github.com/pocoproject/poco/commit/30159aea4b3f6421da9d74a8bf22aad6d3bf26b4.patch
|
|
|
|
POCO_DEPENDENCIES = zlib pcre \
|
|
$(if $(BR2_PACKAGE_POCO_XML),expat) \
|
|
$(if $(BR2_PACKAGE_POCO_CRYPTO),openssl) \
|
|
$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl) \
|
|
$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite) \
|
|
$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),mysql)
|
|
|
|
POCO_OMIT = Data/ODBC PageCompiler \
|
|
$(if $(BR2_PACKAGE_POCO_XML),,XML) \
|
|
$(if $(BR2_PACKAGE_POCO_UTIL),,Util) \
|
|
$(if $(BR2_PACKAGE_POCO_NET),,Net) \
|
|
$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL) \
|
|
$(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto) \
|
|
$(if $(BR2_PACKAGE_POCO_ZIP),,Zip) \
|
|
$(if $(BR2_PACKAGE_POCO_DATA),,Data) \
|
|
$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL) \
|
|
$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite)
|
|
|
|
ifeq ($(LIBC),uclibc)
|
|
POCO_CONF_OPTS += --no-fpenvironment --no-wstring
|
|
endif
|
|
|
|
# architectures missing some FE_* in their fenv.h
|
|
ifeq ($(BR2_sh4a)$(BR2_nios2),y)
|
|
POCO_CONF_OPTS += --no-fpenvironment
|
|
endif
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
POCO_MAKE_TARGET = static_release
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
POCO_MAKE_TARGET = shared_release
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
POCO_MAKE_TARGET = all_release
|
|
endif
|
|
|
|
define POCO_CONFIGURE_CMDS
|
|
(cd $(@D); ./configure \
|
|
--config=Linux \
|
|
--prefix=/usr \
|
|
--omit="$(POCO_OMIT)" \
|
|
$(POCO_CONF_OPTS) \
|
|
--unbundled \
|
|
--no-tests \
|
|
--no-samples)
|
|
endef
|
|
|
|
define POCO_BUILD_CMDS
|
|
$(MAKE) POCO_TARGET_OSARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) \
|
|
MYSQL_LIBDIR=$(STAGING_DIR)/usr/lib/mysql \
|
|
MYSQL_INCDIR=$(STAGING_DIR)/usr/include/mysql \
|
|
DEFAULT_TARGET=$(POCO_MAKE_TARGET) -C $(@D)
|
|
endef
|
|
|
|
define POCO_INSTALL_STAGING_CMDS
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) \
|
|
DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
|
|
endef
|
|
|
|
define POCO_INSTALL_TARGET_CMDS
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) \
|
|
DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
|
|
endef
|
|
|
|
$(eval $(generic-package))
|