From patchwork Thu Oct 5 09:00:02 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: 114849 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp3297edb; Thu, 5 Oct 2017 02:02:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAH1ham8VFKMfAZMcLT7snbpWwbpl6p7Dv2wRixuVYX8alYtwQv7yjzq9su/OssxHO2Pis2 X-Received: by 10.55.181.129 with SMTP id e123mr30273599qkf.128.1507194172650; Thu, 05 Oct 2017 02:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507194172; cv=none; d=google.com; s=arc-20160816; b=DZSozjNq5gvp64N/DQCh0qHMx5cYb4maT+D7SKrY22Xs6OFT01uDSxf+QAtPmcp1wc XzUb3mOLxHrhtbk0QjYIrVPuRfPuLY/WCBrIKn0HKI3Js/KkGBuS2QWvw2CfqL4DvTZH q5ftJHPFtSUqcHkhqdfpQo+hBaGLHnYDTlz0YDIgsSx5gRK2aSeAoYlCNvzMPC/hcf2k tajBERW9HIF0b1t/xNKKHm8LBJJtXUA7Z9YpLRjZH07x4fcrME0Cn4T6p0YEsCbuV8d5 gCuglGf3vyurK7Z+uzb+ep98gfBcdfSAa8zy70kyGQkHI8IV0LdsvMd3M9JBQSQhH7nC uirw== 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=6k8p+lAeUP138AgedCOlvDn0a3UL/AVzpVI5xJrgAdM=; b=PYxtyleW9hfUrLkBt9BG0I31coMvHF0i5IXUWeXn/WS2Igw6JGb/Vk0MZkdAJRVj9i 0v5b5R4BJW3ctDWs1zfCM8CeFvmt1++4sJf0ADf/nxIfN0bylkMoG/yWT4cp4Av2PDu5 L7uks6e5aMFML9V9joPOvcaJujRM7NvKTXUHUrnGAjn6upiEJGGzAfXbJ39BocoamRAZ uCgFGkG8Ljz3wra9DwvAgzvuThlyu8fXYoFL0XcIh57Bv5l6zHckIiGZhdq0wIlWk6gh xYSxFDa1g/ai8jl29fwwHcDq7zqIlAkrnv8tkJnLwsPgt5TVr0Zaqyzx6QpRSIAFvRU7 mhZA== 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 n17si160408qki.236.2017.10.05.02.02.52; Thu, 05 Oct 2017 02:02:52 -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 F0D68644D2; Thu, 5 Oct 2017 09:02:51 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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 6E44A6449A; Thu, 5 Oct 2017 09:00:33 +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 89CF96448F; Thu, 5 Oct 2017 09:00:29 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 0470462C59 for ; Thu, 5 Oct 2017 09:00:27 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward105j.mail.yandex.net (Yandex) with ESMTP id 62AB2184EDF for ; Thu, 5 Oct 2017 12:00:25 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Wm5N5gBjUX-0PP8v98C; Thu, 05 Oct 2017 12:00:25 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id crpg26GhCG-0OauDGjY; Thu, 05 Oct 2017 12:00:24 +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 12:00:02 +0300 Message-Id: <1507194018-5453-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507194018-5453-1-git-send-email-odpbot@yandex.ru> References: <1507194018-5453-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 213 Subject: [lng-odp] [PATCH v1 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: 62f1037bdb0ffd5482e47209bfdbf7d820204116 **/ 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(