From patchwork Sat Aug 22 21:55:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Heading X-Patchwork-Id: 509733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 47D0C140778 for ; Sun, 23 Aug 2015 07:55:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=EGCdec35; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7EA7A8AF8F; Sat, 22 Aug 2015 21:55:49 +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 yDGIBRv0oR1C; Sat, 22 Aug 2015 21:55:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EC3768AF84; Sat, 22 Aug 2015 21:55:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6BF5C1C1640 for ; Sat, 22 Aug 2015 21:55:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 678ADA28E5 for ; Sat, 22 Aug 2015 21:55:47 +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 oR3ivcTBu6x6 for ; Sat, 22 Aug 2015 21:55:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 43BECA28E0 for ; Sat, 22 Aug 2015 21:55:46 +0000 (UTC) Received: by wijp15 with SMTP id p15so45849812wij.0 for ; Sat, 22 Aug 2015 14:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=j2ypOnnE3brnQyjOYKJjzPffFRrsxrK6z1g0p/FrWpM=; b=EGCdec358D7LYc4QJTfkQdD602Ur5OKq4emWSIEWco/99u05Efsy2cfH9ZI3HSE2qY werOLv0GgP67KXtEmeuyHBwVsORAsGnHtpkLiFpq4NMU6bXSPajyk+Gu+10GuEU8bhFu 4kWN0m+Y1s3M0Kqte/Xr5lGF9dSwBKIiLg0TVuPpxeClZ9ISMc1hc2OCVgRgR4nNKT9g o6s1iteiP3rCMbXFt83OqeMIQC3/l7QywlBcJY+fLJI6Wd3Li0QNmRXmXxzXyLW+hoP2 y3W7cczA3ub6PhtvtkU977IIsj7f63l4mW6MDrfXVfm9/QvykZjPmKAiiDFHwZFfzhif 9nqQ== X-Received: by 10.194.192.72 with SMTP id he8mr27345150wjc.11.1440280544748; Sat, 22 Aug 2015 14:55:44 -0700 (PDT) Received: from bhfedora.localdomain ([82.15.84.251]) by smtp.gmail.com with ESMTPSA id 4sm15988287wjt.46.2015.08.22.14.55.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Aug 2015 14:55:44 -0700 (PDT) From: Brendan Heading To: buildroot@buildroot.org Date: Sat, 22 Aug 2015 22:55:41 +0100 Message-Id: <1440280541-28020-1-git-send-email-brendanheading@gmail.com> X-Mailer: git-send-email 2.4.3 Cc: Brendan Heading Subject: [Buildroot] [PATCH 1/1] package/libtirpc: fix atomic compilation issues on some arches 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" Fixes : http://autobuild.buildroot.net/results/fe0/fe0a36890c5de7cca1f35212c4434d53463c4641/ The build is failing because SPARCv8/Leon do not support some the atomic builtin being used. It's likely that some other architectures will see the same issues. As the patch comments note, one of the upstream maintainers feels that the API which uses the atomic builtin should not be there to start with, and has suggested it be removed. We are now waiting to see if there is consensus on this with another principal maintainer. In the meantime, we can apply the patch speculatively to fix the autobuild errors. Since several packages depend on libtirpc it is simpler to do this rather than disable all the dependent packages for each of the architectures which have this limitation. Signed-off-by: Brendan Heading --- .../0008-Revert-Reference-count-AUTHs.patch | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 package/libtirpc/0008-Revert-Reference-count-AUTHs.patch diff --git a/package/libtirpc/0008-Revert-Reference-count-AUTHs.patch b/package/libtirpc/0008-Revert-Reference-count-AUTHs.patch new file mode 100644 index 0000000..b7080ac --- /dev/null +++ b/package/libtirpc/0008-Revert-Reference-count-AUTHs.patch @@ -0,0 +1,120 @@ +From e49380b0dbf4241070f0af3cb5d1237ff90a7207 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Sat, 22 Aug 2015 13:50:33 +0100 +Subject: [PATCH 1/2] Revert "Reference count AUTHs" + +This reverts commit 8271dfe7ec97a993fe3e369c9e02165f54f32322. + +The change introduced by this patch is under discussion with the +libtirpc maintainers. The jist is that the auth_get/auth_set functions +which were added by the commit being reverted here amount to +inappropriate extensions to the API, which do not form part of the +TI-RPC spec. + +The libtirpc maintainers are still discussing the final solution, but +reverting the change (as per this patch) is the most likely outcome. + +See discussion here : +https://sourceforge.net/p/libtirpc/mailman/message/34372096/ + +Upstream-status: pending + +Signed-off-by: Brendan Heading +--- + src/auth_des.c | 1 - + src/auth_gss.c | 2 -- + src/auth_unix.c | 1 - + tirpc/rpc/auth.h | 31 ++++--------------------------- + 4 files changed, 4 insertions(+), 31 deletions(-) + +diff --git a/src/auth_des.c b/src/auth_des.c +index f8749b0..4d3639e 100644 +--- a/src/auth_des.c ++++ b/src/auth_des.c +@@ -223,7 +223,6 @@ authdes_pk_seccreate(const char *servername, netobj *pkey, u_int window, + goto failed; + } + ad->ad_nis_srvr = NULL; /* not needed any longer */ +- auth_get(auth); /* Reference for caller */ + return (auth); + + failed: +diff --git a/src/auth_gss.c b/src/auth_gss.c +index 722d54c..7712a7f 100644 +--- a/src/auth_gss.c ++++ b/src/auth_gss.c +@@ -204,8 +204,6 @@ authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec) + + if (!authgss_refresh(auth, NULL)) + auth = NULL; +- else +- auth_get(auth); /* Reference for caller */ + + clnt->cl_auth = save_auth; + +diff --git a/src/auth_unix.c b/src/auth_unix.c +index 3009543..fc2be02 100644 +--- a/src/auth_unix.c ++++ b/src/auth_unix.c +@@ -161,7 +161,6 @@ authunix_create(machname, uid, gid, len, aup_gids) + */ + auth->ah_cred = au->au_origcred; + marshal_new_auth(auth); +- auth_get(auth); /* Reference for caller */ + return (auth); + #ifndef _KERNEL + cleanup_authunix_create: +diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h +index 3e44863..667f541 100644 +--- a/tirpc/rpc/auth.h ++++ b/tirpc/rpc/auth.h +@@ -191,22 +191,8 @@ typedef struct __auth { + + } *ah_ops; + void *ah_private; +- int ah_refcnt; + } AUTH; + +-static __inline int +-auth_get(AUTH *auth) +-{ +- return __sync_add_and_fetch(&auth->ah_refcnt, 1); +-} +- +-static __inline int +-auth_put(AUTH *auth) +-{ +- return __sync_sub_and_fetch(&auth->ah_refcnt, 1); +-} +- +- + + /* + * Authentication ops. +@@ -236,19 +222,10 @@ auth_put(AUTH *auth) + #define auth_refresh(auth, msg) \ + ((*((auth)->ah_ops->ah_refresh))(auth, msg)) + +-#define AUTH_DESTROY(auth) \ +- do { \ +- int refs; \ +- if ((refs = auth_put((auth))) == 0) \ +- ((*((auth)->ah_ops->ah_destroy))(auth));\ +- } while (0) +- +-#define auth_destroy(auth) \ +- do { \ +- int refs; \ +- if ((refs = auth_put((auth))) == 0) \ +- ((*((auth)->ah_ops->ah_destroy))(auth));\ +- } while (0) ++#define AUTH_DESTROY(auth) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth)) ++#define auth_destroy(auth) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth)) + + #define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ + ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ +-- +2.4.3 +