libfolly: Update to 2019.06.10.00
authorRosen Penev <rosenp@gmail.com>
Mon, 10 Jun 2019 19:26:10 +0000 (12:26 -0700)
committerRosen Penev <rosenp@gmail.com>
Thu, 13 Jun 2019 23:14:15 +0000 (16:14 -0700)
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 <rosenp@gmail.com>
libs/libfolly/Makefile
libs/libfolly/patches/102-uclibc-patches.patch [new file with mode: 0644]

index 73df0725f73d3943fce3f3eee167e8558ae4d221..8f4cc9dc6b1d6c932ab8c5dc941fbe277c7dce39 100644 (file)
@@ -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 <ambhave@fb.com>
 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 (file)
index 0000000..7a68fb9
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/folly/CachelinePadded.h
++++ b/folly/CachelinePadded.h
+@@ -35,10 +35,6 @@ namespace folly {
+  */
+ template <typename T>
+ class CachelinePadded {
+-  static_assert(
+-      alignof(T) <= max_align_v,
+-      "CachelinePadded does not support over-aligned types.");
+-
+  public:
+   template <typename... Args>
+   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 <byteswap.h>
+ #endif