From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90974A0524 for ; Fri, 5 Feb 2021 12:36:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 845B64067B; Fri, 5 Feb 2021 12:36:54 +0100 (CET) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 4AEDF18892B for ; Fri, 5 Feb 2021 12:36:53 +0100 (CET) Received: by mail-wr1-f47.google.com with SMTP id d16so7268412wro.11 for ; Fri, 05 Feb 2021 03:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=50EZBCF/HbMSVEGk7DHo1WIpVOVsBU99qxtvnspeVXc=; b=moLx7W3gWYYNsMnOCv8mV2f3GgghbWmnSpVhEuxHWD0XPmxpBp+XhlV1aYfqgp+NH7 HdMDOymO+aOBOXp3zQ9O1j4b0QecNdJxr61P58MgFcC6WZ3lFS91upWHgV7K4CQf8v4J Zhq+sTIPS+N3HNsrKoCCw2dIXLy5ckWJ2uwjgugZF5eWUJQFXQsHdafm5EiHSUUtWf1m VgTLAvZwNqcmrboyTiZycFBVEpsxeSGvEiak8xxChxUv03hHRxwHWNiQG5Om6KC0gy2v iP+i64lUVZW2Qa81u5xp+kAsKubKDwAjEHzhh/jAdh91qJao5hkXgG4hO7Espfj1EVYC jAnw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=50EZBCF/HbMSVEGk7DHo1WIpVOVsBU99qxtvnspeVXc=; b=IqhTLP0qpqxzqaKvCm46m89ToK7DMcw2d+Z8tcEMvOpFMa4VzjtU8nl+Do6EMFnmvC m6bQc6OdqWPNwt1QPKjNOMA9biPGqRsSsYzYgeWWVt7JwIA2QEGcc0pvAVdxjDs65Sho 29zAg/5b9y3pAsean1/i2nVIVOBHM9PCVL14AUjTLZaAN32a33Fg8csha+aASvRCGnrj uE3quzOOYK04yh5i+NhHT+TAssfGgfywVRaBQ6awOstZBT5ClR6HgW8rQO9Jff3y3l24 2myB8eZGv6l/TzInR49tlqhjNcQRJiXSuOuTsNt1yo3ATy7csAs6NU1abxnxz3S1Cs/t xWxw== X-Gm-Message-State: AOAM533cnjMHu/xtxVKHmuFj4hSJE5TBAFh+onyXP/ElVIfkSaH0cSHH E3QRkP8uyBw5El+koF9B4ZPJllEXoTCNAHSn X-Google-Smtp-Source: ABdhPJyfw1mHaOO1+Iu4S8Qtbu3XXogJsnpMLEa2q/qZy+XgsnQU83JwZa2bSBb4Zf1FZxrxCJmOUA== X-Received: by 2002:a5d:4a50:: with SMTP id v16mr4577811wrs.241.1612525013124; Fri, 05 Feb 2021 03:36:53 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o124sm8962072wmb.5.2021.02.05.03.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:36:52 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: dpdk stable Date: Fri, 5 Feb 2021 11:18:26 +0000 Message-Id: <20210205111920.1272063-220-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal: fix internal ABI tag with clang' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/527f81e20ee738ac62e3268accb7841ba94db184 Thanks. Luca Boccassi --- >From 527f81e20ee738ac62e3268accb7841ba94db184 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Fri, 29 Jan 2021 16:48:16 +0000 Subject: [PATCH] eal: fix internal ABI tag with clang [ upstream commit 4ab63cd60ceb343db43da8ed060e45e165393dae ] Clang does not have an "error" attribute for functions, so for marking internal functions we need to check for the error attribute, and provide a fallback if it is not present. For clang, we can use "diagnose_if" attribute, similarly checking for its presence before use. Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") Signed-off-by: Bruce Richardson --- lib/librte_eal/include/rte_compat.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 4cd8f68d68..2718612cce 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -19,12 +19,23 @@ __attribute__((section(".text.experimental"))) #endif -#ifndef ALLOW_INTERNAL_API +#ifndef __has_attribute +/* if no has_attribute assume no support for attribute too */ +#define __has_attribute(x) 0 +#endif + +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ + +#define __rte_internal \ +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ +section(".text.internal"))) + #else #define __rte_internal \ -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:38.890084853 +0000 +++ 0220-eal-fix-internal-ABI-tag-with-clang.patch 2021-02-05 11:18:29.174698119 +0000 @@ -1 +1 @@ -From 4ab63cd60ceb343db43da8ed060e45e165393dae Mon Sep 17 00:00:00 2001 +From 527f81e20ee738ac62e3268accb7841ba94db184 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4ab63cd60ceb343db43da8ed060e45e165393dae ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org