This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
From d105213bccfa4392eda889a95f808dd9cdf84494 Mon Sep 17 00:00:00 2001
From: Charles Hardin <charles.hardin@storagecraft.com>
Date: Mon, 21 May 2018 09:19:30 -0700
Subject: [PATCH] Fix to allow a compilation under mips big endian with gcc
The __MIPSEL__ is mips little endian specific, but we needed to
compile for a big endian mips target that also happened to be a
mips64. This commit replaces the __MIPSEL__ test with a __mips__ test
which preserves the build on little endian and allows building for a
big endian setup.
$ echo | mips64-linux-gcc -E -dM -
... snip snip ...
#define __mips__ 1
#define __MIPSEB__ 1
Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
Upstream-status: https://github.com/google/protobuf/pull/4657
---
src/google/protobuf/stubs/platform_macros.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index c3a64dd2..f9e2bff6 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -56,7 +56,7 @@
#elif defined(__aarch64__)
#define GOOGLE_PROTOBUF_ARCH_AARCH64 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-#elif defined(__MIPSEL__)
+#elif defined(__mips__)
#if defined(__LP64__)
#define GOOGLE_PROTOBUF_ARCH_MIPS64 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
--
2.15.1 (Apple Git-101)

View File

@@ -0,0 +1,47 @@
# See src/google/protobuf/stubs/platform_macros.h for supported archs.
#
# On PowerPC, the __atomic_*() built-ins for 1-byte, 2-byte and 4-byte
# types are available built-in. However, the __atomic_*() built-ins for
# 8-byte types is implemented via libatomic, so only available since gcc
# 4.8.
#
# In Buildroot, to simplify things, we've decided to simply require gcc
# 4.8 as soon as the architectures has at least one __atomic_*() built-in
# variant that requires libatomic.
#
# Since protobuf most likely only uses the 1, 2 and 4-byte variants, it
# *could* technically build with gcc 4.7. This is probably not a big deal,
# and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
#
# host-protobuf only builds on certain architectures
config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
bool
default y if BR2_arm
default y if BR2_i386
default y if BR2_mipsel
default y if BR2_x86_64
default y if BR2_sparc64
default y if BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_USE_MMU # fork()
config BR2_PACKAGE_PROTOBUF
bool "protobuf"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on !BR2_STATIC_LIBS
help
Protocol buffers are Google's language-neutral,
platform-neutral, extensible mechanism for serializing
structured data.
https://developers.google.com/protocol-buffers
comment "protobuf needs a toolchain w/ C++, threads, dynamic library, host and target gcc >= 4.8"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
|| BR2_STATIC_LIBS || !BR2_HOST_GCC_AT_LEAST_4_8 \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 c3cab055964d554e4fd85067fe3e9eb45c9915cebcf537e97fafaa245376bce1 protobuf-cpp-3.6.0.tar.gz
sha256 6e5e117324afd944dcf67f36cf329843bc1a92229a8cd9bb573d7a83130fea7d LICENSE

View File

@@ -0,0 +1,31 @@
################################################################################
#
# protobuf
#
################################################################################
# When bumping this package, make sure to also verify if the
# python-protobuf package still works, as they share the same
# version/site variables.
PROTOBUF_VERSION = 3.6.0
PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
# N.B. Need to use host protoc during cross compilation.
PROTOBUF_DEPENDENCIES = host-protobuf
PROTOBUF_CONF_OPTS = --with-protoc=$(HOST_DIR)/bin/protoc
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
PROTOBUF_CONF_ENV += LIBS=-latomic
endif
PROTOBUF_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_ZLIB),y)
PROTOBUF_DEPENDENCIES += zlib
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))