From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBB04C32750 for ; Tue, 13 Aug 2019 11:28:57 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 7854920673 for ; Tue, 13 Aug 2019 11:28:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7854920673 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E80791BE89; Tue, 13 Aug 2019 13:28:51 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id D1A051BE83 for ; Tue, 13 Aug 2019 13:28:50 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hxUyw-0005xN-EG; Tue, 13 Aug 2019 11:28:50 +0000 From: Christian Ehrhardt To: dev Cc: Luca Boccassi , Thomas Monjalon , Frank Heimes , Christian Ehrhardt Date: Tue, 13 Aug 2019 13:28:43 +0200 Message-Id: <20190813112843.27072-2-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190813112843.27072-1-christian.ehrhardt@canonical.com> References: <20190813112843.27072-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The AltiVec header file breaks boolean type: error: incompatible types when initializing type '__vector _bool int' {aka '_vector(4) __bool int'} using type 'int' If __APPLE_ALTIVEC__ is defined, then bool type is redefined and conflicts with stdbool.h. There is no good solution to fix it for the whole project without breaking something else, so a workaround is inserted in mlx5 PMD. This workaround is not compatible with C++ but there is no C++ in DPDK. Related to: https://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340 Signed-off-by: Christian Ehrhardt --- drivers/net/mlx4/mlx4_utils.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h index a49190252..74b9d2ecd 100644 --- a/drivers/net/mlx4/mlx4_utils.h +++ b/drivers/net/mlx4/mlx4_utils.h @@ -15,6 +15,16 @@ #include "mlx4.h" +/* + * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11. + * Otherwise there would be a type conflict between stdbool and altivec. + */ +#if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__) +#undef bool +/* redefine as in stdbool.h */ +#define bool _Bool +#endif + extern int mlx4_logtype; #ifndef NDEBUG -- 2.22.0