From patchwork Wed Jun 20 19:58:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 932375 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 419wdL361zz9s2L for ; Thu, 21 Jun 2018 05:59:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5DB8886D55; Wed, 20 Jun 2018 19:58:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MNvph7d9zaCO; Wed, 20 Jun 2018 19:58:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8D9D486C77; Wed, 20 Jun 2018 19:58:57 +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 7D22E1BFF2B for ; Wed, 20 Jun 2018 19:58:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D1A7488E1B for ; Wed, 20 Jun 2018 19:58:10 +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 IfOQV+zsDjj5 for ; Wed, 20 Jun 2018 19:58:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5C1F988E14 for ; Wed, 20 Jun 2018 19:58:09 +0000 (UTC) Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout07.t-online.de (Postfix) with SMTP id 406744232B67 for ; Wed, 20 Jun 2018 21:58:06 +0200 (CEST) Received: from fli4l.lan.fli4l (TWtOuaZaQhDVKOeHOPG66BdMp+XVwAVWgctH6Dk4gLH8VHAk1NB6ZgXDAKtwGBxZwD@[91.58.9.25]) by fwd34.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fVjEz-1NQi3M0; Wed, 20 Jun 2018 21:58:05 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:54622 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.91) (envelope-from ) id 1fVjEy-0006Ar-Cw for buildroot@buildroot.org; Wed, 20 Jun 2018 21:58:04 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Wed, 20 Jun 2018 21:58:04 +0200 Message-Id: <20180620195804.9594-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.17.1 X-ID: TWtOuaZaQhDVKOeHOPG66BdMp+XVwAVWgctH6Dk4gLH8VHAk1NB6ZgXDAKtwGBxZwD X-TOI-MSGID: 6a01219e-39f5-4f23-a991-3e8079a9593b Subject: [Buildroot] [PATCH 1/1] package/berkeleydb: fix build error with gcc8 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes ../src/dbinc/atomic.h:179:19: error: definition of 'int __atomic_compare_exchange(db_atomic_t*, atomic_value_t, atomic_value_t)' ambiguates built-in declaration 'bool __atomic_compare_exchange(unsigned int, volatile void*, void*, void*, int, int)' static inline int __atomic_compare_exchange( ^~~~~~~~~~~~~~~~~~~~~~~~~ To reproduce the build error use this defconfig BR2_GCC_VERSION_8_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PACKAGE_BERKELEYDB=y BR2_PACKAGE_BERKELEYDB_COMPAT185=y BR2_PACKAGE_BERKELEYDB_TOOLS=y Please note that to trigger the error BR2_TOOLCHAIN_BUILDROOT_CXX=y is needed although berkeleydb does not depend on c++. Signed-off-by: Bernd Kuhls --- .../0002-atomic_compare_exchange.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/berkeleydb/0002-atomic_compare_exchange.patch diff --git a/package/berkeleydb/0002-atomic_compare_exchange.patch b/package/berkeleydb/0002-atomic_compare_exchange.patch new file mode 100644 index 0000000000..81e18ac96f --- /dev/null +++ b/package/berkeleydb/0002-atomic_compare_exchange.patch @@ -0,0 +1,27 @@ +Rename __atomic_compare_exchange to not clash with gcc built-in + +Downloaded from +https://src.fedoraproject.org/cgit/rpms/libdb.git/commit/?id=d6841b3b46a51db98c162347211a5a64d154ea37 + +Signed-off-by: Bernd Kuhls + +--- db-5.3.28/src/dbinc/atomic.h.old 2018-05-23 09:20:04.216914922 +0200 ++++ db-5.3.28/src/dbinc/atomic.h 2018-05-23 09:20:49.510057897 +0200 +@@ -144,7 +144,7 @@ + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __db_atomic_compare_exchange((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __db_atomic_compare_exchange( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was;