From patchwork Thu Jan 28 13:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 574683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3F953140BD0 for ; Fri, 29 Jan 2016 00:08:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DAB50868D3; Thu, 28 Jan 2016 13:08:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GMt3YPTRwLwH; Thu, 28 Jan 2016 13:08:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 10A9D868FB; Thu, 28 Jan 2016 13:08:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 4C5BE1C1098 for ; Thu, 28 Jan 2016 13:08:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 474E194AE9 for ; Thu, 28 Jan 2016 13:08:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id txi9z44FFZp0 for ; Thu, 28 Jan 2016 13:08:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by hemlock.osuosl.org (Postfix) with ESMTPS id 76BB68AC10 for ; Thu, 28 Jan 2016 13:08:50 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id C5F4D1582E0D; Thu, 28 Jan 2016 11:03:56 -0200 (BRST) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id B5AA81582CCC; Thu, 28 Jan 2016 11:03:56 -0200 (BRST) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4YsJzhZvjd_R; Thu, 28 Jan 2016 11:03:56 -0200 (BRST) Received: from PEDELD048.datacom.net (pedeld048.datacom.net [10.0.120.146]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 8E6D91582BF4; Thu, 28 Jan 2016 11:03:56 -0200 (BRST) From: Carlos Santos To: buildroot@buildroot.org Date: Thu, 28 Jan 2016 11:08:35 -0200 Message-Id: <1453986515-9505-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.5.0 Subject: [Buildroot] [PATCH 1/1] protobuf: apply patch to compile for PowerPC X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Henrique Marks Signed-off-by: Henrique Marks Signed-off-by: Carlos Santos --- package/protobuf/0001-PowerPC-Support.patch | 54 +++++++++++++++++++++++++++++ package/protobuf/Config.in | 5 ++- 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 package/protobuf/0001-PowerPC-Support.patch diff --git a/package/protobuf/0001-PowerPC-Support.patch b/package/protobuf/0001-PowerPC-Support.patch new file mode 100644 index 0000000..aee3717 --- /dev/null +++ b/package/protobuf/0001-PowerPC-Support.patch @@ -0,0 +1,54 @@ +From d56c6b19b18dc459c1ea6b720ef015afe72757ea Mon Sep 17 00:00:00 2001 +From: Henrique Marks +Date: Fri, 28 Aug 2015 18:55:49 -0300 +Subject: [PATCH 1/1] Syntax Error Patch + +Signed-off-by: Henrique Marks +--- + src/google/protobuf/stubs/atomicops.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h +index b1336e3..a130b38 100644 +--- a/src/google/protobuf/stubs/atomicops.h ++++ b/src/google/protobuf/stubs/atomicops.h +@@ -162,7 +162,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); + + // Include our platform specific implementation. + #define GOOGLE_PROTOBUF_ATOMICOPS_ERROR \ +-#error "Atomic operations are not supported on your platform" ++"Atomic operations are not supported on your platform" + + // ThreadSanitizer, http://clang.llvm.org/docs/ThreadSanitizer.html. + #if defined(THREAD_SANITIZER) +@@ -172,7 +172,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); + #if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) + #include + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // Solaris +@@ -203,15 +203,15 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #if __has_extension(c_atomic) + #include + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // Unknown. + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // On some platforms we need additional declarations to make AtomicWord +-- +1.9.1 + diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in index 9ee7e7d..3899ac1 100644 --- a/package/protobuf/Config.in +++ b/package/protobuf/Config.in @@ -3,8 +3,7 @@ config BR2_PACKAGE_PROTOBUF depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS # See src/google/protobuf/stubs/platform_macros.h for supported archs. - # PowerPC doesn't actually work. - depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 || BR2_powerpc # host-protobuf only builds on certain architectures depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" depends on !BR2_STATIC_LIBS @@ -17,5 +16,5 @@ config BR2_PACKAGE_PROTOBUF comment "protobuf needs a toolchain w/ C++, threads, dynamic library" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ || BR2_STATIC_LIBS - depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 || BR2_powerpc depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"