Browse Source

protobuf: Update version to 2.6.1

- Unbroke MIPS support which got entirely lost since the upgrade from 2.4.1:
  now all ISAs should work (MIPS1 would need kernel emulation though, untested)
- Fixed host installation which was broken on all targets
- Updated source origin to github and related variables
- Kept mipseb patch exception and MIPS16:=0 exclusion (needed for BB and CC compilation)

Only tested on a ZyXEL NBG6716 router which is MIPS32 (MIPS74Kc), ar71xx target.

Signed-off-by: Guillaume Déflache <guillaume.deflache@ibwag.com>
Guillaume Déflache 9 years ago
parent
commit
869bab445d

+ 5
- 13
libs/protobuf/Makefile View File

@@ -8,18 +8,18 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=protobuf
11
-PKG_VERSION:=2.5.0
11
+PKG_VERSION:=2.6.1
12 12
 PKG_RELEASE:=1
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
-PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
16
-PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
15
+PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
16
+PKG_MD5SUM:=11aaac2d704eef8efd1867a807865d85
17 17
 
18 18
 PKG_LICENSE:=BSD-3-Clause
19 19
 PKG_LICENSE_FILES:=LICENSE
20 20
 
21 21
 PKG_BUILD_DEPENDS:=protobuf/host
22
-PKG_USE_MIPS16:=0
22
+PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
23 23
 
24 24
 PKG_INSTALL:=1
25 25
 
@@ -41,15 +41,7 @@ define Package/protobuf/description
41 41
  of its internal RPC protocols and file formats.
42 42
 endef
43 43
 
44
-define Host/Compile
45
-	$(MAKE) -C $(HOST_BUILD_DIR)
46
-endef
47
-
48
-define Host/Install
49
-	$(MAKE) -C $(HOST_BUILD_DIR) install
50
-endef
51
-
52
-CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
44
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
53 45
 
54 46
 define Build/InstallDev
55 47
 	$(INSTALL_DIR) \

+ 9
- 9
libs/protobuf/patches/001-mipseb-compile.patch View File

@@ -1,11 +1,11 @@
1
---- a/src/google/protobuf/stubs/platform_macros.h
2
-+++ b/src/google/protobuf/stubs/platform_macros.h
3
-@@ -49,7 +49,7 @@
4
- #elif defined(__ARMEL__)
5
- #define GOOGLE_PROTOBUF_ARCH_ARM 1
6
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
1
+--- -	2015-05-19 16:27:29.770936016 +0200
2
++++ protobuf-2.6.1/src/google/protobuf/stubs/platform_macros.h	2015-05-19 13:49:52.115444643 +0200
3
+@@ -55,7 +55,7 @@
4
+ #elif defined(__aarch64__)
5
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
6
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
7 7
 -#elif defined(__MIPSEL__)
8 8
 +#elif defined(__MIPSEL__) || defined(__MIPSEB__)
9
- #define GOOGLE_PROTOBUF_ARCH_MIPS 1
10
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
11
- #elif defined(__pnacl__)
9
+ #if defined(__LP64__)
10
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
11
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

+ 11
- 0
libs/protobuf/patches/003-mips2andHigher-compile.patch View File

@@ -0,0 +1,11 @@
1
+--- -	2015-05-19 16:29:09.614344473 +0200
2
++++ protobuf-2.6.1/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h	2015-05-19 13:49:52.127442746 +0200
3
+@@ -150,7 +150,7 @@
4
+ }
5
+ 
6
+ inline void MemoryBarrier() {
7
+-  __asm__ __volatile__("sync" : : : "memory");
8
++  __asm__ __volatile__(".set mips2; sync; .set mips0" : : : "memory");
9
+ }
10
+ 
11
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {