From patchwork Wed Jan 31 13:00:06 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: 126328 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp706829ljc; Wed, 31 Jan 2018 05:03:39 -0800 (PST) X-Google-Smtp-Source: AH8x225xXClLM8YdVwZIk6O3VgAo1UEx7VjV27iB8dTO/NeeAh4M2UsYyuteWsampt/qAypBuxDg X-Received: by 10.37.171.18 with SMTP id u18mr21326759ybi.88.1517403819167; Wed, 31 Jan 2018 05:03:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517403819; cv=none; d=google.com; s=arc-20160816; b=N2R0kzkvpJmkMNdlAbbhZSoXX6O6rZ5m6NKEQx/IMo2M+wdUjSU8XmV9XqrQHAa+E4 2GC0i9/RS1p7OxjrLGXAPUrqjlRF7jhLX6ueBbdpoj3s3Ms92Xlr8CoHjNRBYaSqrKWN +hrtdqTrP8UJGggUTZfXcbcd0+f0ZH/c4OCz5ygbS2h7eLV6Gn34x/oFXDtFak2VsMUQ CpWSeLLiRcX8W31uCu6Hh7NgWrLqWunzjBRXXY5Qc6rWBBNB6qGXGJRS1ARh5CryJIcv 0ZAZSlmoGKNeV6HCUjpEMb+iK383yv9w7aF0uNlFh3TM4VVfdCteXhCaazPleVHXIeSo u9aQ== 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=XszflbKhtQGC2Yw6KUpwfd1g28I9Y4/0+LDx6i1Z/8Q=; b=WPRHmcsmdKp6ngKc+WAajZnlO+OcNTxGfj9EEYCpFj0ucElow4cfreVLcUQER5Llmm afweyEUGWxwSr/UP6MxmUafIdaoqaTnJG9e6MaN1rwn1E0Rlf2OWBp1jhxFlmb0Mbahu mXDvfx17M8gHZrjITgFKUXwgmku+FleVj3GyoT65XcfCoz3U/16xn4LNy77bNqkz3VpB g0W9gVBLeWMX6h2N4OLcCQg1yU7PEto68U7yWV3XgDYQTKVTicdguk0onznYX6+NZzhZ A4IdL8UtM+sjH83JaQmAqUvFQt0M4cDfjvwMS2ykNwI2doQU8Kw3GRuRVEw3qsuFeZD8 UYSg== 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 f94si2462212qki.45.2018.01.31.05.03.38; Wed, 31 Jan 2018 05:03: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 C8C60617B1; Wed, 31 Jan 2018 13:03: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 B293561787; Wed, 31 Jan 2018 13:00:48 +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 29F7A61765; Wed, 31 Jan 2018 13:00:22 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id D2072609ED for ; Wed, 31 Jan 2018 13:00:13 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 9B0B634C5708 for ; Wed, 31 Jan 2018 16:00:12 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PH6M9KVVe1-0CGWg43P; Wed, 31 Jan 2018 16:00:12 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id vZ2onGHxam-0BhCuRus; 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:06 +0300 Message-Id: <1517403609-12603-4-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 3/6] configure: set ODP_CFLAGS/CXXFLAGS before descending into platform 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 platform m4/configure.m4 file might want to change compiler flags. So let's set them before calling into platform file. 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 | 74 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index 03a233d17..01fdc5a8c 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,43 @@ CC_VERSION_MAJOR=$(echo $CC_VERSION | cut -d'.' -f1) CC_VERSION_MINOR=$(echo $CC_VERSION | cut -d'.' -f2) CC_VERSION_PATCH=$(echo $CC_VERSION | cut -d'.' -f3) +########################################################################## +# Default warning setup +########################################################################## +ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror" + +ODP_CHECK_CFLAG([-Wstrict-prototypes]) +ODP_CHECK_CFLAG([-Wmissing-prototypes]) +ODP_CHECK_CFLAG([-Wmissing-declarations]) +ODP_CHECK_CFLAG([-Wold-style-definition]) +ODP_CHECK_CFLAG([-Wpointer-arith]) +ODP_CHECK_CFLAG([-Wcast-align]) +ODP_CHECK_CFLAG([-Wnested-externs]) +ODP_CHECK_CFLAG([-Wcast-qual]) +ODP_CHECK_CFLAG([-Wformat-nonliteral]) +ODP_CHECK_CFLAG([-Wformat-security]) +ODP_CHECK_CFLAG([-Wundef]) +ODP_CHECK_CFLAG([-Wwrite-strings]) +ODP_CHECK_CFLAG([-Wformat-truncation=0]) +ODP_CHECK_CFLAG([-Wformat-overflow=0]) + +ODP_CFLAGS="$ODP_CFLAGS -std=c99" +ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11" + +# Extra flags for example to suppress certain warning types +ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA" + +########################################################################## +# Check if compiler supports cmpxchng16 on x86-based architectures +########################################################################## +case "${host}" in + i?86? | x86*) + if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then + ODP_CHECK_CFLAG([-mcx16]) + fi + ;; +esac + ########################################################################## # Allow valgrind suite to run against the defined tests ########################################################################## @@ -310,43 +347,6 @@ AC_ARG_ENABLE([deprecated], fi]) AC_SUBST(ODP_DEPRECATED_API) -########################################################################## -# Default warning setup -########################################################################## -ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror" - -ODP_CHECK_CFLAG([-Wstrict-prototypes]) -ODP_CHECK_CFLAG([-Wmissing-prototypes]) -ODP_CHECK_CFLAG([-Wmissing-declarations]) -ODP_CHECK_CFLAG([-Wold-style-definition]) -ODP_CHECK_CFLAG([-Wpointer-arith]) -ODP_CHECK_CFLAG([-Wcast-align]) -ODP_CHECK_CFLAG([-Wnested-externs]) -ODP_CHECK_CFLAG([-Wcast-qual]) -ODP_CHECK_CFLAG([-Wformat-nonliteral]) -ODP_CHECK_CFLAG([-Wformat-security]) -ODP_CHECK_CFLAG([-Wundef]) -ODP_CHECK_CFLAG([-Wwrite-strings]) -ODP_CHECK_CFLAG([-Wformat-truncation=0]) -ODP_CHECK_CFLAG([-Wformat-overflow=0]) - -ODP_CFLAGS="$ODP_CFLAGS -std=c99" -ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11" - -# Extra flags for example to suppress certain warning types -ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA" - -########################################################################## -# Check if compiler supports cmpxchng16 on x86-based architectures -########################################################################## -case "${host}" in - i?86? | x86*) - if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then - ODP_CHECK_CFLAG([-mcx16]) - fi - ;; -esac - ########################################################################## # Default include setup ##########################################################################