From patchwork Thu Oct 5 17:59:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114968 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp494162edb; Thu, 5 Oct 2017 11:05:55 -0700 (PDT) X-Google-Smtp-Source: AOwi7QChcjBXPeqMMdbk6nb1YZQQ69CK0GMl8P2SEs1koLnjOW2+uhrZV0dECxfMelZGW1UuJcmv X-Received: by 10.200.39.202 with SMTP id x10mr20352375qtx.139.1507226755447; Thu, 05 Oct 2017 11:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507226755; cv=none; d=google.com; s=arc-20160816; b=PvzRbsj+bRAhLX4qkRzut+smv7koZjdKUytmJB7gN8xg4dVAqBY3TSkCfPZp4Wrmac SmYxyBuDmGpfmCacCwx6Z8mtbvUvz5V1hvotrFO0qBNrXUohoocykc1JDGixXWoztEcs /ys6h4hFiyKz0EBQNpmJZqLB+22qJqAJ/G2KX6FY8mOTEd4dUDpMDF0i1f/m0nFsM19j Vyw+oqOB+2wqUTYXPRtEIJx8WcgfXjnd138//iOMIrZBsDabnDELAMvbT52bmYwfhoTb sz34lEzMTctw5ZQhDbjmOVkZ4nXAzJwyZmIWXP9RSbQciOta+ophUJLrnh9KAahp5M2Y MTLg== 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=KW+go2Bx2U8PV9lrKgGyrQbC8M1hH9D/m6RcFQRAzIg=; b=l9KzCRNV79WshA6lO0LbvaZwX9cBxtR4wj6qVKM4LP0ZblCNY8rfrG3eregKgt4vaA h/kVyiKPwELQcV60I1lxAwC84zK1f83DzbXyFZBdKclVbIwXmZn3UbEsqc2hIFpsVOPN HJrn7adyyS2l03FAM1jz+ijK7CG2TGnWxoyvsJhDICFEF/02vlMkk89ScgSBGI5rj852 hfMEHAbJOKXnxcmKrnCfeEZmWccH2574o+J8k33ya+zCpIdkXUNlNHZWtjmBvR5wmviX /t/XOoKwtkC5Lk597PQojZht3aqAy4tq26+9yiHDv2uKdvcmYAzu+vqc4ZnA3ziAQ9Ex pjcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t58si130482qtt.29.2017.10.05.11.05.54; Thu, 05 Oct 2017 11:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 C4839644C0; Thu, 5 Oct 2017 18:05:54 +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,URIBL_BLOCKED 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 62E25644CF; Thu, 5 Oct 2017 18:02:18 +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 A28AA6449D; Thu, 5 Oct 2017 18:02:04 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 024416449D for ; Thu, 5 Oct 2017 18:00:30 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward105o.mail.yandex.net (Yandex) with ESMTP id C6A304443351 for ; Thu, 5 Oct 2017 21:00:28 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vG05GExd1R-0MKS1owk; Thu, 05 Oct 2017 21:00:22 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AZHOFl0KbL-0MWOrY6I; Thu, 05 Oct 2017 21:00:22 +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: Thu, 5 Oct 2017 20:59:59 +0300 Message-Id: <1507226415-26756-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507226415-26756-1-git-send-email-odpbot@yandex.ru> References: <1507226415-26756-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 213 Subject: [lng-odp] [PATCH v3 4/20] m4: move -fvisibility=hidden check 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 213 (lumag:plat-def) ** https://github.com/Linaro/odp/pull/213 ** Patch: https://github.com/Linaro/odp/pull/213.patch ** Base sha: 52cfe7ba6d2541cf5ee464e46e91b2da5efe1497 ** Merge commit sha: 4157d06d3a16265d7d6152d7ae4918ec5623c10c **/ m4/odp_visibility.m4 | 21 +++++++++++++++++++++ platform/linux-generic/m4/configure.m4 | 12 +----------- 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 m4/odp_visibility.m4 diff --git a/m4/odp_visibility.m4 b/m4/odp_visibility.m4 new file mode 100644 index 000000000..955971f3c --- /dev/null +++ b/m4/odp_visibility.m4 @@ -0,0 +1,21 @@ +# ODP_VISIBILITY +# -------------- +# Enable -fvisibility=hidden if using a gcc that supports it + +AC_DEFUN([ODP_VISIBILITY], [dnl +VISIBILITY_CFLAGS="-fvisibility=hidden" +AC_CACHE_CHECK([whether $CC supports -fvisibility=hidden], + [odp_cv_visibility_hidden], [dnl +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], [odp_cv_visibility_hidden=yes], + [odp_cv_visibility_hidden=no]) +CFLAGS=$OLD_CFLAGS +]) + +if test "x$odp_cv_visibility_hidden" != "xyes" ; then + VISIBILITY_CFLAGS="" +fi + +AC_SUBST(VISIBILITY_CFLAGS) +]) # ODP_VISIBILITY diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 4d6ef49b9..4e3ce6344 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -1,14 +1,4 @@ -# Enable -fvisibility=hidden if using a gcc that supports it -OLD_CFLAGS="$CFLAGS" -AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) -VISIBILITY_CFLAGS="-fvisibility=hidden" -CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" -AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), - [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]); - -AC_SUBST(VISIBILITY_CFLAGS) -# Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. -CFLAGS=$OLD_CFLAGS +ODP_VISIBILITY AC_MSG_CHECKING(for GCC atomic builtins) AC_LINK_IFELSE(