From patchwork Sun May 6 15:19:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 909328 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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40f8Z928qGz9s0q for ; Mon, 7 May 2018 01:20:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A6CDC87D75; Sun, 6 May 2018 15:19:57 +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 MNbOsRxzR2r7; Sun, 6 May 2018 15:19:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0DE0E87D76; Sun, 6 May 2018 15:19: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 8D63A1BFFDB for ; Sun, 6 May 2018 15:19:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8A80E87D76 for ; Sun, 6 May 2018 15:19:56 +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 CgZ-KoRS06EI for ; Sun, 6 May 2018 15:19:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout06.t-online.de (mailout06.t-online.de [194.25.134.19]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7210B87D75 for ; Sun, 6 May 2018 15:19:54 +0000 (UTC) Received: from fwd00.aul.t-online.de (fwd00.aul.t-online.de [172.20.26.147]) by mailout06.t-online.de (Postfix) with SMTP id BF68A41C733D for ; Sun, 6 May 2018 17:19:51 +0200 (CEST) Received: from fli4l.lan.fli4l (ECX5o4ZX8h2jNm3OBuWXoIuW0IbSg+kkhxzlx1bG7bXT4GMg05a5iDqjXCt3N1Qws0@[91.58.4.169]) by fwd00.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fFLS1-104vYW0; Sun, 6 May 2018 17:19:49 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:47062 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.91) (envelope-from ) id 1fFLS1-000206-0Y for buildroot@buildroot.org; Sun, 06 May 2018 17:19:49 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 6 May 2018 17:19:47 +0200 Message-Id: <20180506151947.13821-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.14.2 X-ID: ECX5o4ZX8h2jNm3OBuWXoIuW0IbSg+kkhxzlx1bG7bXT4GMg05a5iDqjXCt3N1Qws0 X-TOI-MSGID: 28308126-4a4b-4ae8-b34a-edffb6bacce2 Subject: [Buildroot] [PATCH 1/1] package/berkeleydb: fix gcc8 build error 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 gcc8 build error: In file included from ../src/dbinc/mutex_int.h:12, from ../src/dbinc/mutex.h:15, from ./db_int.h:1113, from ../lang/cxx/cxx_channel.cpp:11: ../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(long unsigned int, volatile void*, void*, void*, int, int)' static inline int __atomic_compare_exchange( ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Bernd Kuhls --- ...me-local-__atomic_compare_exchange-to-avo.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/berkeleydb/0002-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch diff --git a/package/berkeleydb/0002-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch b/package/berkeleydb/0002-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch new file mode 100644 index 0000000000..b734a0611a --- /dev/null +++ b/package/berkeleydb/0002-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch @@ -0,0 +1,52 @@ +From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 22 Mar 2017 15:32:26 +0000 +Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash + with builtins + +Helps building with clang + +Fixes + +../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange' +static inline int __atomic_compare_exchange( + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Downloaded from +http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch + +Fixes gcc-8 build error. + +Signed-off-by: Bernd Kuhls +--- + src/dbinc/atomic.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index 6a858f7..1b49de5 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #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 @@ static inline int __atomic_dec(db_atomic_t *p) + * 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; +-- +1.8.3.1 +