mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
46
package/wampcc/0001-Add-RISC-V-endian-detection.patch
Normal file
46
package/wampcc/0001-Add-RISC-V-endian-detection.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From e94589ed36c4a311355efc46ba3f76523c546057 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Wed, 7 Aug 2019 16:17:16 +0200
|
||||
Subject: [PATCH] Add RISC-V endian detection
|
||||
|
||||
3rdparty/msgpack-c/include/msgpack/predef/other/endian.h (which comes
|
||||
from Boost) two ways of detecting the endianess:
|
||||
|
||||
(1) It includes <endian.h> if BOOST_LIB_C_GNU is defined, and then
|
||||
use __BYTE_ORDER to decide the endianness.
|
||||
|
||||
(2) Otherwise, if (1) was not possible for some reason, it uses
|
||||
architecture defines to decide the endianness.
|
||||
|
||||
(1) works perfectly fine with glibc toolchains, because
|
||||
BOOST_LIB_C_GNU is defined, but it doesn't work with musl. Due to
|
||||
this, <endian.h> is not included, __BYTE_ORDER is not defined, and
|
||||
method (1) does not work, causing build failures on musl toolchains
|
||||
that don't have explicit handling by architecture name (method 2).
|
||||
|
||||
So this commit fixes RISC-V musl build by adding support for the
|
||||
__riscv architecture define, to determine that the endianness is
|
||||
little endian.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
3rdparty/msgpack-c/include/msgpack/predef/other/endian.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
index 3c609fa..63a5722 100644
|
||||
--- a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
+++ b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
@@ -127,7 +127,8 @@ information and acquired knowledge:
|
||||
defined(__AARCH64EL__) || \
|
||||
defined(_MIPSEL) || \
|
||||
defined(__MIPSEL) || \
|
||||
- defined(__MIPSEL__)
|
||||
+ defined(__MIPSEL__) || \
|
||||
+ defined(__riscv)
|
||||
# undef MSGPACK_ENDIAN_LITTLE_BYTE
|
||||
# define MSGPACK_ENDIAN_LITTLE_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
--
|
||||
2.21.0
|
||||
|
||||
30
package/wampcc/Config.in
Normal file
30
package/wampcc/Config.in
Normal file
@@ -0,0 +1,30 @@
|
||||
config BR2_PACKAGE_WAMPCC
|
||||
bool "wampcc"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
||||
depends on BR2_USE_MMU # libuv
|
||||
depends on !BR2_STATIC_LIBS # libuv
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
|
||||
select BR2_PACKAGE_LIBUV
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
wampcc is a C++ library that implements the Web Application
|
||||
Messaging Protocol.
|
||||
|
||||
https://github.com/darrenjs/wampcc
|
||||
|
||||
comment "wampcc needs a toolchain w/ C++, NPTL, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
|
||||
|
||||
comment "wampcc needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
3
package/wampcc/wampcc.hash
Normal file
3
package/wampcc/wampcc.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 b3c3633b4c6a74d7ac8a676a7ea30fbfde7ae19aa1fc37de3b8aa3a553b674a2 wampcc-1.6.tar.gz
|
||||
sha256 bd185b1ec8a292d42b42346757ff6e198073e13c1e080e9ea548d34dd42d30d8 LICENSE
|
||||
19
package/wampcc/wampcc.mk
Normal file
19
package/wampcc/wampcc.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
#
|
||||
# wampcc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
WAMPCC_VERSION = 1.6
|
||||
WAMPCC_SITE = $(call github,darrenjs,wampcc,v$(WAMPCC_VERSION))
|
||||
WAMPCC_DEPENDENCIES = host-pkgconf libuv jansson openssl
|
||||
WAMPCC_INSTALL_STAGING = YES
|
||||
WAMPCC_LICENSE = MIT
|
||||
WAMPCC_LICENSE_FILES = LICENSE
|
||||
|
||||
# Uses __atomic_fetch_add_8
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
WAMPCC_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user