From 05771578163420a7284ca454f99a233c5dd81153 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 10 Jun 2019 12:26:10 -0700 Subject: [PATCH] libfolly: Update to 2019.06.10.00 Partially restore uclibc patch. Some parts were upstreamed while others were not. Fixes compilation without ChaCha20 support in OpenSSL 1.1 and above. Depend on libunwind conditionally. libunwind is not supported on all targets. Depending on it unconditionally makes libfolly and dependent packages unavailable on those targets. Added missing Maintainer. Several Makefile rearrangements for consistency. Signed-off-by: Rosen Penev --- libs/libfolly/Makefile | 34 ++++++++++--------- .../libfolly/patches/102-uclibc-patches.patch | 23 +++++++++++++ 2 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 libs/libfolly/patches/102-uclibc-patches.patch diff --git a/libs/libfolly/Makefile b/libs/libfolly/Makefile index 73df0725f..8f4cc9dc6 100644 --- a/libs/libfolly/Makefile +++ b/libs/libfolly/Makefile @@ -1,40 +1,32 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libfolly -PKG_VERSION:=2019.05.27.00 +PKG_VERSION:=2019.06.10.00 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=7535937e4b4bde14e6c854dc55a5fe9f290ccf1918621f20678ebecd0c1239e1 +PKG_HASH:=afecd68815a83865d95a3a6b861abe8096beefae45c89566e0d510279b631b57 PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_VERSION) +PKG_MAINTAINER:=Amol Bhave PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - PKG_BUILD_PARALLEL:=1 -CMAKE_OPTIONS:= \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCXX_STD=gnu++14 \ - -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \ - -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \ - -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \ - -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \ - -DFOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0 \ - -DBUILD_SHARED_LIBS=ON CMAKE_INSTALL:=1 +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + define Package/libfolly SECTION:=libs CATEGORY:=Libraries TITLE:=An open-source C++ library developed and used at Facebook. URL:=https://github.com/facebook/folly DEPENDS:=+boost +boost-context +boost-date_time +boost-filesystem +boost-program_options +boost-regex \ - +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libunwind +libatomic \ - +libbz2 +zlib +libzstd +liblzma +liblz4 + +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libatomic \ + +libbz2 +zlib +libzstd +liblzma +liblz4 +PACKAGE_libunwind:libunwind endef define Package/libfolly/description @@ -45,6 +37,16 @@ define Package/libfolly/description This package includes the shared library. endef +CMAKE_OPTIONS += \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCXX_STD=gnu++14 \ + -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \ + -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \ + -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \ + -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \ + -DFOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0 \ + -DBUILD_SHARED_LIBS=ON + define Package/libfolly/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfolly*.so* $(1)/usr/lib/ diff --git a/libs/libfolly/patches/102-uclibc-patches.patch b/libs/libfolly/patches/102-uclibc-patches.patch new file mode 100644 index 000000000..7a68fb974 --- /dev/null +++ b/libs/libfolly/patches/102-uclibc-patches.patch @@ -0,0 +1,23 @@ +--- a/folly/CachelinePadded.h ++++ b/folly/CachelinePadded.h +@@ -35,10 +35,6 @@ namespace folly { + */ + template + class CachelinePadded { +- static_assert( +- alignof(T) <= max_align_v, +- "CachelinePadded does not support over-aligned types."); +- + public: + template + explicit CachelinePadded(Args&&... args) +--- a/folly/external/farmhash/farmhash.cpp ++++ b/folly/external/farmhash/farmhash.cpp +@@ -181,6 +181,7 @@ + + #undef bswap_32 + #undef bswap_64 ++#undef _BYTESWAP_H + #include + + #endif