summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-04-05 15:28:33 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-04-05 19:31:28 +0000
commit193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch)
treee12769d7c76d8b0517d6de3d3c72189753d253ed /meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
parentbd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff)
downloadtalos-openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.gz
talos-openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.zip
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD: poky: 8217b477a1(master) meta-xilinx: 64aa3d35ae(master) meta-openembedded: 0435c9e193(master) meta-raspberrypi: 490a4441ac(master) meta-security: cb6d1c85ee(master) Squashed patches: meta-phosphor: drop systemd 239 patches meta-phosphor: mrw-api: use correct install path Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch113
1 files changed, 0 insertions, 113 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch b/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
deleted file mode 100644
index d736f012b..000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From a614d8e20fa9e4fd16b699d581ddac2956c120f5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 19 Sep 2017 10:04:02 -0700
-Subject: [PATCH 1/2] flatbuffers: Move EndianSwap template to
- flatbuffers/base.h
-
-Clang complains
-call to function 'EndianSwap' that is neither visible in the template definition nor found by argument-dependent lookup
- return EndianSwap(t);
-
-This seems to be due to limitation of two-phase lookup of dependent names in template definitions
-
-Its not being found using associated namespaces therefore
-it has to be made visible at the template definition site as well
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- include/flatbuffers/base.h | 33 +++++++++++++++++++++++++++++++++
- include/flatbuffers/flatbuffers.h | 32 --------------------------------
- 2 files changed, 33 insertions(+), 32 deletions(-)
-
-diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
-index f051755..c73fb2d 100644
---- a/include/flatbuffers/base.h
-+++ b/include/flatbuffers/base.h
-@@ -150,6 +150,39 @@ typedef uintmax_t largest_scalar_t;
- // We support aligning the contents of buffers up to this size.
- #define FLATBUFFERS_MAX_ALIGNMENT 16
-
-+template<typename T> T EndianSwap(T t) {
-+ #if defined(_MSC_VER)
-+ #define FLATBUFFERS_BYTESWAP16 _byteswap_ushort
-+ #define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
-+ #define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
-+ #else
-+ #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408
-+ // __builtin_bswap16 was missing prior to GCC 4.8.
-+ #define FLATBUFFERS_BYTESWAP16(x) \
-+ static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
-+ #else
-+ #define FLATBUFFERS_BYTESWAP16 __builtin_bswap16
-+ #endif
-+ #define FLATBUFFERS_BYTESWAP32 __builtin_bswap32
-+ #define FLATBUFFERS_BYTESWAP64 __builtin_bswap64
-+ #endif
-+ if (sizeof(T) == 1) { // Compile-time if-then's.
-+ return t;
-+ } else if (sizeof(T) == 2) {
-+ auto r = FLATBUFFERS_BYTESWAP16(*reinterpret_cast<uint16_t *>(&t));
-+ return *reinterpret_cast<T *>(&r);
-+ } else if (sizeof(T) == 4) {
-+ auto r = FLATBUFFERS_BYTESWAP32(*reinterpret_cast<uint32_t *>(&t));
-+ return *reinterpret_cast<T *>(&r);
-+ } else if (sizeof(T) == 8) {
-+ auto r = FLATBUFFERS_BYTESWAP64(*reinterpret_cast<uint64_t *>(&t));
-+ return *reinterpret_cast<T *>(&r);
-+ } else {
-+ assert(0);
-+ }
-+}
-+
-+
- template<typename T> T EndianScalar(T t) {
- #if FLATBUFFERS_LITTLEENDIAN
- return t;
-diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
-index 9216cf4..f749dcb 100644
---- a/include/flatbuffers/flatbuffers.h
-+++ b/include/flatbuffers/flatbuffers.h
-@@ -37,38 +37,6 @@ inline void EndianCheck() {
- (void)endiantest;
- }
-
--template<typename T> T EndianSwap(T t) {
-- #if defined(_MSC_VER)
-- #define FLATBUFFERS_BYTESWAP16 _byteswap_ushort
-- #define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
-- #define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
-- #else
-- #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408
-- // __builtin_bswap16 was missing prior to GCC 4.8.
-- #define FLATBUFFERS_BYTESWAP16(x) \
-- static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
-- #else
-- #define FLATBUFFERS_BYTESWAP16 __builtin_bswap16
-- #endif
-- #define FLATBUFFERS_BYTESWAP32 __builtin_bswap32
-- #define FLATBUFFERS_BYTESWAP64 __builtin_bswap64
-- #endif
-- if (sizeof(T) == 1) { // Compile-time if-then's.
-- return t;
-- } else if (sizeof(T) == 2) {
-- auto r = FLATBUFFERS_BYTESWAP16(*reinterpret_cast<uint16_t *>(&t));
-- return *reinterpret_cast<T *>(&r);
-- } else if (sizeof(T) == 4) {
-- auto r = FLATBUFFERS_BYTESWAP32(*reinterpret_cast<uint32_t *>(&t));
-- return *reinterpret_cast<T *>(&r);
-- } else if (sizeof(T) == 8) {
-- auto r = FLATBUFFERS_BYTESWAP64(*reinterpret_cast<uint64_t *>(&t));
-- return *reinterpret_cast<T *>(&r);
-- } else {
-- assert(0);
-- }
--}
--
- template<typename T> FLATBUFFERS_CONSTEXPR size_t AlignOf() {
- #ifdef _MSC_VER
- return __alignof(T);
---
-2.14.1
-
OpenPOWER on IntegriCloud