From patchwork Tue Jul 10 22:31:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Carlson X-Patchwork-Id: 942274 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G7E2YzPM"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41QH4L4lYPz9s70 for ; Wed, 11 Jul 2018 08:31:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1896887321; Tue, 10 Jul 2018 22:31:44 +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 K2M4D-z6ZTGn; Tue, 10 Jul 2018 22:31:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 3ACCF8744A; Tue, 10 Jul 2018 22:31:42 +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 2140F1CEF80 for ; Tue, 10 Jul 2018 22:31:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1F38387A27 for ; Tue, 10 Jul 2018 22:31:41 +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 F6QuBmXVO2Oy for ; Tue, 10 Jul 2018 22:31:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) by hemlock.osuosl.org (Postfix) with ESMTPS id 8C250878D4 for ; Tue, 10 Jul 2018 22:31:39 +0000 (UTC) Received: by mail-it0-f41.google.com with SMTP id g4-v6so995215iti.1 for ; Tue, 10 Jul 2018 15:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1eb+5Gmh8K5nqOkkLff9LotSWyRdUBCjoGRLBH7xMn0=; b=G7E2YzPMhQq/h1Q2v52TUR0OhM/s6IamWbW8mqG0v5FEacQ/+RO1hG1iAYJ4WqSEH9 9T1l7AOIIdV0NhaseogL/02wNJ7GlYnjxcsKuqIfYu+VNgMvmR67aJ76nbmn8qKUGUCa iPX1RofoZNWk6mcoAy8JI3GnP8h3uIKNuDIv74EWrcr0+18Yrlmt4eivgrzPq18VKk2T JrcT3lEjVxfz1PNcQddEr8oyG9dpBrh94BmgrFOc+oaOjpIHEMB/JLbP8SbZv3pwqcHr UW0rH/u6QghqnbS2XGE7toMIXBqbJ1wgQ5zqER52C0wshagL4CHsUe19PxbZ/mhpn9GU sXXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1eb+5Gmh8K5nqOkkLff9LotSWyRdUBCjoGRLBH7xMn0=; b=DvsC63B+qns1Ver08o6FC4MMjfi7T0kb2w62SgISIsu7UUJQicuKcxH0uuh+3JDtNe lOd/OchGnVxPMHnBBDNLhxViwBwY++1awzEoVSZFLl1h+te9ZHVK/Ao+/N+4rxzHE1tB nIutKachzntxy9d3mfFLGnDI5WJwMhBRZCcmiOPUDZ8KycJ2lqJh3ohqSVtUs0cbEAgN Pd1U/V6qY6+an7B8m8rw0nGQ8o2QKipQ0fi8S0UrjwM9BvE/hO9jDJkCpQX41m2Q2Aez 90J03nuPiCbFs2wZKfhmWtNBou6TpqS9fyqj7zzxChopFg2TkrdANLmEq473gb7pYcZ9 t72A== X-Gm-Message-State: APt69E2a8SkIRlb+AcPQC7TjL9arzifaPh5hmkwdJFUp3vfBjXH/kc+F gfO4SdL9XWgk+N7JtxV2rCaPIQ1D X-Google-Smtp-Source: AAOMgpftACePNcl6IshNLBKVn1wK/H5XdMRnJTWkgjsLyt4HkZsPL1inCWvNxTV+x5dwTgbt3Bg1cA== X-Received: by 2002:a24:7911:: with SMTP id z17-v6mr21761588itc.116.1531261898551; Tue, 10 Jul 2018 15:31:38 -0700 (PDT) Received: from caes-s76-9.eng.cosmicaes.com (50-206-27-134-static.hfc.comcastbusiness.net. [50.206.27.134]) by smtp.gmail.com with ESMTPSA id g4-v6sm1459390iok.11.2018.07.10.15.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jul 2018 15:31:37 -0700 (PDT) From: Joel Carlson X-Google-Original-From: Joel Carlson To: buildroot@buildroot.org Date: Tue, 10 Jul 2018 16:31:25 -0600 Message-Id: <1531261885-2834-1-git-send-email-JoelsonCarl@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 1/1] capnproto: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Koen Martens Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Adds the capnproto package. This also builds a host variant to generate the capnp compiler that can be used to compile message definitions into C++ code. Includes a patch from upstream to fix an issue with uclibc. Signed-off-by: Koen Martens Signed-off-by: Joel Carlson --- Changes v3->v4: - added my SoB to package patch (suggested by Arnout) (also now able to use patch from upstream without modification) - added hash of license file (Arnout) - added comment in .mk for use of AUTORECONF (Arnout) - added dependency on BR2_TOOLCHAIN_HAS_ATOMIC (Arnout) - switched to use *_SUBDIR instead of custom extraction commands (Arnout) (I missed the existence of *_SUBDIR in the manual when reading!) Retested v4 with test-pkg (but not -a like v3): 6 builds, 1 skipped, 0 build failed, 0 legal-info failed --- DEVELOPERS | 2 ++ package/Config.in | 1 + .../0001-Do-not-use-execinfo-h-with-uclibc.patch | 30 ++++++++++++++++++++++ package/capnproto/Config.in | 24 +++++++++++++++++ package/capnproto/capnproto.hash | 3 +++ package/capnproto/capnproto.mk | 23 +++++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 package/capnproto/0001-Do-not-use-execinfo-h-with-uclibc.patch create mode 100644 package/capnproto/Config.in create mode 100644 package/capnproto/capnproto.hash create mode 100644 package/capnproto/capnproto.mk diff --git a/DEVELOPERS b/DEVELOPERS index 48ab0d9..8185c12 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -983,6 +983,7 @@ F: package/x11r7/xdriver_xf86-video-imx/ F: package/x11r7/xdriver_xf86-video-imx-viv/ N: Joel Carlson +F: package/capnproto/ F: package/cmocka/ F: package/flatcc/ @@ -1117,6 +1118,7 @@ N: Kevin Joly F: package/libgphoto2/ N: Koen Martens +F: package/capnproto/ F: package/linuxconsoletools/ N: Kurt Van Dijck diff --git a/package/Config.in b/package/Config.in index 20fe5ad..5d61f8a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1504,6 +1504,7 @@ menu "Other" source "package/bctoolbox/Config.in" source "package/bdwgc/Config.in" source "package/boost/Config.in" + source "package/capnproto/Config.in" source "package/clang/Config.in" source "package/clapack/Config.in" source "package/classpath/Config.in" diff --git a/package/capnproto/0001-Do-not-use-execinfo-h-with-uclibc.patch b/package/capnproto/0001-Do-not-use-execinfo-h-with-uclibc.patch new file mode 100644 index 0000000..6bb7702 --- /dev/null +++ b/package/capnproto/0001-Do-not-use-execinfo-h-with-uclibc.patch @@ -0,0 +1,30 @@ +From e651ac5febc59e3e2b5d3365ededbe5362756da2 Mon Sep 17 00:00:00 2001 +From: Koen Martens +Date: Wed, 12 Jul 2017 18:49:32 +0200 +Subject: [PATCH] Do not use execinfo.h with uclibc (#511) + +Upstream commit: https://github.com/capnproto/capnproto/commit/e651ac5febc59e3e2b5d3365ededbe5362756da2 + +Signed-off-by: Koen Martens +Signed-off-by: Joel Carlson + +--- + c++/src/kj/exception.c++ | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/c++/src/kj/exception.c++ b/c++/src/kj/exception.c++ +index 218f1db..339601a 100644 +--- a/c++/src/kj/exception.c++ ++++ b/c++/src/kj/exception.c++ +@@ -33,7 +33,7 @@ + #endif + #include "io.h" + +-#if (__linux__ && __GLIBC__) || __APPLE__ ++#if (__linux__ && __GLIBC__ && !__UCLIBC__) || __APPLE__ + #define KJ_HAS_BACKTRACE 1 + #include + #endif +-- +2.7.4 + diff --git a/package/capnproto/Config.in b/package/capnproto/Config.in new file mode 100644 index 0000000..00328fa --- /dev/null +++ b/package/capnproto/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_CAPNPROTO + bool "capnproto" + depends on BR2_USE_MMU + 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_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + help + Cap'n Proto is an insanely fast data interchange format + and capability-based RPC system. Think JSON, except + binary. Or think Protocol Buffers, except faster. In + fact, in benchmarks, Cap’n Proto is INFINITY TIMES + faster than Protocol Buffers. + + https://capnproto.org/index.html + +comment "capnproto needs host and target gcc >= 4.8 w/ C++, threads, atomic" + depends on BR2_USE_MMU + depends on !BR2_HOST_GCC_AT_LEAST_4_8 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ + !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HAS_ATOMIC diff --git a/package/capnproto/capnproto.hash b/package/capnproto/capnproto.hash new file mode 100644 index 0000000..1a65cdd --- /dev/null +++ b/package/capnproto/capnproto.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 85210424c09693d8fe158c1970a2bca37af3a0424f02b263f566a1b8a5451a2d capnproto-v0.6.1.tar.gz +sha256 16194222e9412c3aa14d2287953f7fc89a1dcbcdd266d1534ba35060d4cde5b6 LICENSE diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk new file mode 100644 index 0000000..cf1dd4a --- /dev/null +++ b/package/capnproto/capnproto.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# capnproto +# +################################################################################ + +CAPNPROTO_VERSION = v0.6.1 +CAPNPROTO_SITE = $(call github,capnproto,capnproto,$(CAPNPROTO_VERSION)) +CAPNPROTO_LICENSE = MIT +CAPNPROTO_LICENSE_FILES = LICENSE +CAPNPROTO_INSTALL_STAGING = YES +# Fetched from Github with no configure script +CAPNPROTO_AUTORECONF = YES +CAPNPROTO_CONF_OPTS = --with-external-capnp +# Needs the capnproto compiler on the host to generate C++ code from message +# definitions +CAPNPROTO_DEPENDENCIES = host-autoconf host-capnproto +CAPNPROTO_CONF_ENV += LIBS=-latomic +# The actual source to be compiled is within a 'c++' subdirectory +CAPNPROTO_SUBDIR = c++ + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))