From patchwork Wed Jan 31 13:00:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126327 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp705825ljc; Wed, 31 Jan 2018 05:02:39 -0800 (PST) X-Google-Smtp-Source: AH8x225Ny5FTPH236luGjWY8rf2/Z3AkYXDZr9jUuzW7MrQPdoTZdyyixYTO0pfLGKqp0itKcLYj X-Received: by 10.129.159.140 with SMTP id w134mr22572490ywg.469.1517403759113; Wed, 31 Jan 2018 05:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517403759; cv=none; d=google.com; s=arc-20160816; b=lJlwxowPJ+IYsAZA+MgL/NsCJOQZG1gBchRaZe74QG31/VouUx9iviDQErlgEm18fZ Xr97RCAjhoyDpjBhjXqYBK96MUQgpmKYuCvrtikhyx+GASJ96DxhSizIjV01LYO31E+c /Ll8BEJSLwHo75l+J/4eoqVmnGdOOi1cgf+Ef4BJdKT+nMBD/g4cQs7zWq06O8CpUoxy eYkRdy/WNtXZ+CPUaf5VOC9HPQ5hohmF13qX6fsxHs66HQIf8QxXXuMExhTKS2RT20d3 Bq02B5Ys0nkcg/kVmsjX3hYxDVxYqEukffun58EdTQAWPHo5i6JJ4bqMmjctMW8qRkFd tU/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=974ec7IO6Gu588MNcRNxbWhCWCldkC+ZrQGWrQqtscg=; b=NFa9NTMWXxNx/q7TiCVee4UrSes7fHsceFCy9Sio+50DajA009TmBb5/u9+Ntx95CN v1TsGFURpKBjC0eldIvR1dfh8dDgho77UmA/PiOX8j1Ozq3e9GGn28Wa9kCl4dNIsm7M xiRxrFs+CLmqh/T9qiOBVFfdM1ermAJdfWBduvFagqyFfv8+cDmHSXUNYLcURMYmXYsM LhK7Ou2t2mJp+dAHSnlCEv9QoFnMpuuoUpGE2MRVzEa0s1q5sQtgJJvl0jC9ndkElsUi VklaufJ8MC5HhTObbp3CiDjncxNEdeAL0O+Zy8KkhYHT8TKpJNC+c+bShXxJDI26ZEx9 F3gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id f44si1907283qte.357.2018.01.31.05.02.38; Wed, 31 Jan 2018 05:02:39 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C7F0B617C9; Wed, 31 Jan 2018 13:02:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 45D87617A1; Wed, 31 Jan 2018 13:00:42 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9C91C6177B; Wed, 31 Jan 2018 13:00:21 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 7B4E06094D for ; Wed, 31 Jan 2018 13:00:13 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward103j.mail.yandex.net (Yandex) with ESMTP id E290C34C4C12 for ; Wed, 31 Jan 2018 16:00:11 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id umcf4chMwM-0BbSnjkQ; Wed, 31 Jan 2018 16:00:11 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id vZ2onGHxam-0Bhu38bh; Wed, 31 Jan 2018 16:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 31 Jan 2018 16:00:05 +0300 Message-Id: <1517403609-12603-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517403609-12603-1-git-send-email-odpbot@yandex.ru> References: <1517403609-12603-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 440 Subject: [lng-odp] [PATCH v1 2/6] configure: move ODP_CHECK_CFLAG to separate file X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 440 (lumag:build-fixes) ** https://github.com/Linaro/odp/pull/440 ** Patch: https://github.com/Linaro/odp/pull/440.patch ** Base sha: b95ccd3db6eeb7358a877541747e06354429acdd ** Merge commit sha: 6f20299f993632a4dda987a31b37160d80c25279 **/ configure.ac | 8 -------- m4/odp_check_flag.m4 | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 m4/odp_check_flag.m4 diff --git a/configure.ac b/configure.ac index 1edc01f4e..03a233d17 100644 --- a/configure.ac +++ b/configure.ac @@ -315,14 +315,6 @@ AC_SUBST(ODP_DEPRECATED_API) ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror" -dnl Use -Werror in the checks below since Clang emits a warning instead of -dnl an error when it encounters an unknown warning option. -AC_DEFUN([ODP_CHECK_CFLAG], - [AX_CHECK_COMPILE_FLAG([$1], - [ODP_CFLAGS="$ODP_CFLAGS $1"], - [], [-W -Wall -Werror], - [AC_LANG_SOURCE([int main(void) - {return 0;}])])]) ODP_CHECK_CFLAG([-Wstrict-prototypes]) ODP_CHECK_CFLAG([-Wmissing-prototypes]) ODP_CHECK_CFLAG([-Wmissing-declarations]) diff --git a/m4/odp_check_flag.m4 b/m4/odp_check_flag.m4 new file mode 100644 index 000000000..e3c8ef714 --- /dev/null +++ b/m4/odp_check_flag.m4 @@ -0,0 +1,12 @@ +dnl Use -Werror in the checks below since Clang emits a warning instead of +dnl an error when it encounters an unknown warning option. + +# ODP_CHECK_CFLAG(FLAG) +# --------------------- +# Add FLAG to ODP_CFLAGS if compiler supports that option +AC_DEFUN([ODP_CHECK_CFLAG], + [AX_CHECK_COMPILE_FLAG([$1], + [ODP_CFLAGS="$ODP_CFLAGS $1"], + [], [-W -Wall -Werror], + [AC_LANG_SOURCE([int main(void) + {return 0;}])])])