From patchwork Fri Feb 9 03:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10208221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E22C6603EE for ; Fri, 9 Feb 2018 03:09:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFBBE29680 for ; Fri, 9 Feb 2018 03:09:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C439229683; Fri, 9 Feb 2018 03:09:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 747A329684 for ; Fri, 9 Feb 2018 03:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbeBIDJR (ORCPT ); Thu, 8 Feb 2018 22:09:17 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:34237 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752497AbeBIDJN (ORCPT ); Thu, 8 Feb 2018 22:09:13 -0500 Received: by mail-io0-f196.google.com with SMTP id x188so1637092iod.1 for ; Thu, 08 Feb 2018 19:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xEpiJRKTRHBggq3mTFnkIn7XmRqu+gQJqGfq35oqIa0=; b=SWy7nH1GnxrGr+QDVUR/OGNYyezRlYxXY8o+rRIlKTZREAq34iJ1KUMX54eC8DIHbW dOtInVM323PTkFP4lqGSO6XPICg80P1qXrv6rHS9/9rLAJgxzxNXWRKe6hpAfGwCHE4w ISMsnjnVcsnGKF67x2ZpY3EQx0IrwtF2895KE6ufmrljmw3AZ484b5+uSpd1DfWaPkjg fL8WI9sSDldenGKN8CJuKd2yiD20Poop/e9DMJiw1bMoICOmul/0oVEO3iANiXhzC4um AEpLwljXJBrkTQ8VEV6wcnv+i6dzNY0GmX5ebQnodSQzFP9MSVDlu4k6PrpX4vKW7eb/ zOgg== 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; bh=xEpiJRKTRHBggq3mTFnkIn7XmRqu+gQJqGfq35oqIa0=; b=hMFp5yYPKKGXgINkZlaCxG9nqwWn9khrL3fFrIVM9zs0MWtRpc1c305Y5Nm9JCjmFg gkkmzw3WCxCnRDOAKvnPDUWW9RVxOhjsX0w/6U3+vLkcvPqG4ftXA2NPtzKTuYtl3bv1 h3F1Pr+PPB4+vTEWGpRklCAJeTdvhHARYfF8GJoe8yguyQbGJKGtseZ0aVtvUBMkNwvP V8flFpgyl3v2OX4HeI8OKiSVzoKWwdNP3SUDdiBnBDUGqCGZzCjZ1LjtvWFBmPsZr4R3 zTlvarcrAeH4gNd3bP1Is0WYdO8oUVTfG4Rk7uBWT3FjjhzBvRzjazX8rWekgPN8LLz/ iQxw== X-Gm-Message-State: APf1xPDdbiwZiXTcEY6thvj1Q4RhNrMji+fMr8MTMs/NzMfZsI5QD5A4 obgmOzpEJwjq9DkciR3mUrvp9oek5Do= X-Google-Smtp-Source: AH8x227sh76SjdNMgKlaJdy64HNAG9hLoFaeCUWagHNwxr8ED9Liv/WQ7qSjf4Gak2MVRBtKj8FsXg== X-Received: by 10.107.48.68 with SMTP id w65mr1501692iow.84.1518145752946; Thu, 08 Feb 2018 19:09:12 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id c13sm1263052itd.27.2018.02.08.19.09.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 19:09:11 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ejz3m-0005q2-5j; Thu, 08 Feb 2018 20:09:10 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 2/7] Enable GNU99 mode if the compiler does not support C11 Date: Thu, 8 Feb 2018 20:08:59 -0700 Message-Id: <20180209030904.22370-3-jgg@ziepe.ca> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209030904.22370-1-jgg@ziepe.ca> References: <20180209030904.22370-1-jgg@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe We have several places now that use C99 features and assume those are enabled. Very old GCC's default to C89 and need to have C99 mode enabled by command line, such as Centos 6. Fix building on those old compilers by forcing C99 mode. Signed-off-by: Jason Gunthorpe --- buildlib/RDMA_EnableCStd.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildlib/RDMA_EnableCStd.cmake b/buildlib/RDMA_EnableCStd.cmake index c8a8c1f5530c13..c2e170929b7dde 100644 --- a/buildlib/RDMA_EnableCStd.cmake +++ b/buildlib/RDMA_EnableCStd.cmake @@ -49,6 +49,8 @@ function(RDMA_EnableCStd) CHECK_C_COMPILER_FLAG("-std=gnu11" SUPPORTS_GNU11) if (SUPPORTS_GNU11) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11" PARENT_SCOPE) + else() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99" PARENT_SCOPE) endif() else() # Newer cmake can do this internally