- Fix build with armv6

PR:		197167
Submitted by:	<mikael.urankar@gmail.com>
Obtained from:	cc0a047384
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2015-02-21 08:38:43 +00:00
parent 6a2588d000
commit 0bc3113f50
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379486
3 changed files with 32 additions and 1 deletions

View file

@ -15,7 +15,7 @@ LICENSE= BSD3CLAUSE
CFLAGS+= -DGOOGLE_PROTOBUF_NO_RTTI
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS= amd64 armv6 i386
USE_LDCONFIG= yes
USES= gmake libtool pathfix pkgconfig tar:bzip2

View file

@ -0,0 +1,11 @@
--- src/google/protobuf/stubs/atomicops.h.orig 2014-08-26 03:52:37.000000000 +0800
+++ src/google/protobuf/stubs/atomicops.h 2015-02-21 11:45:38.816841509 +0800
@@ -182,6 +182,8 @@
#elif defined(__GNUC__)
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_gcc.h>
+#elif defined(GOOGLE_PROTOBUF_ARCH_ARM) && defined(__FreeBSD__)
+#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM) && defined(__linux__)
#include <google/protobuf/stubs/atomicops_internals_arm_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64)

View file

@ -0,0 +1,20 @@
--- src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.orig 2014-08-26 03:52:37.000000000 +0800
+++ src/google/protobuf/stubs/atomicops_internals_generic_gcc.h 2015-02-21 11:38:26.948928195 +0800
@@ -83,7 +83,7 @@
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- __atomic_store_n(ptr, value, __ATOMIC_ACQUIRE);
+ __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST);
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
@@ -99,7 +99,7 @@
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- return __atomic_load_n(ptr, __ATOMIC_RELEASE);
+ return __atomic_load_n(ptr, __ATOMIC_SEQ_CST);
}
#ifdef __LP64__