From patchwork Fri Oct 6 18: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: 115116 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2129688qgn; Fri, 6 Oct 2017 12:05:19 -0700 (PDT) X-Google-Smtp-Source: AOwi7QB5cr+kJ0tf/UUdz+WMf1j4ufBd+gRSKtKzPSxMWhe6d02Qux6p+lO3H6Vkx3MIDH4vkMgP X-Received: by 10.107.143.201 with SMTP id r192mr3536258iod.36.1507316719801; Fri, 06 Oct 2017 12:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507316719; cv=none; d=google.com; s=arc-20160816; b=CFiQ64dOwx7FHXus2FbtM5wJ6OV8VpB3+1A+DRcABkPMdHZe3cngDpQoJCcNF4fkDe fGhjjocCt1HU30tuS8IgIdfsbX6UWAwH8SGWxsMdHzE7SMTRNmqzIYdN/wrZ/Bf1Iop3 b5T8WWrU818/Bg1IzUwvhvrBkAKrFmb6BD0Y5P0IXFv1nCM6xIfqCsqrdRYlECG3yPjm XywiJsitcq0rqKH5eXCVa8Q2sB7pkpGtH/HHUqvQAUtpr0BtByCoSGhmYuqikvUP/8Gg /awiS7QFoAJL6nwTYSJnszV4NMiiUmEABNNlgL2Y7XjB8W8nJxY1xqZzAtdPGmFpfmoL NCVQ== 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=SHqghpKKexJkeJjQxYhGMKzltluCq0UvZWjfQsatOCU=; b=0/GZ4WE/+uPZavWwBwO35/fAwpI0M7NOM5LbNrLVw6OvEH1+08PsuBHT3wpIIadXkL CZ6RhCMSpjAih6/B2BYy1CKfcVH9x93TxQXomy5yf7XLRGUrLSEYuv+GoHMuqdNz/+YN dKiqNdMYrKAzyD2xQmCHwsZn8STg2JQ7SWwqxeNPfa82u0VyY7fNvT4Ucahxp+xnJiFh SPOU2ysm1+rkmMWsYvvU2gHEM31y4Rl8SKUOlYLVnFpxqhJNL1w8t5R3AhPlBQ41Wxtj q+UhctsHiVn7WxmH4HL93XEIVL8axjMylc2s+J5e5ckbbENxHQt1NQnnrL+nHZyZOA09 rg7g== 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 c16si1492460iob.93.2017.10.06.12.05.19; Fri, 06 Oct 2017 12:05:19 -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 1787565BFE; Fri, 6 Oct 2017 19:05:19 +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 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 383266088C; Fri, 6 Oct 2017 19:01:47 +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 2C52565BE9; Fri, 6 Oct 2017 19:01:40 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 9C40C65BBA for ; Fri, 6 Oct 2017 19:00:36 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 300BC40830CB for ; Fri, 6 Oct 2017 22:00:35 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 1inOx9IIUe-0Zv4CuVr; Fri, 06 Oct 2017 22:00:35 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id d2nf8B3eVo-0YtGCmB5; Fri, 06 Oct 2017 22:00:34 +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: Fri, 6 Oct 2017 21:59:59 +0300 Message-Id: <1507316415-2144-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507316415-2144-1-git-send-email-odpbot@yandex.ru> References: <1507316415-2144-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 213 Subject: [lng-odp] [PATCH v4 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: a63f25ff2994b2df78c24f1f8b63d0e06628eb68 ** Merge commit sha: d50e2e291ff11c1319e66c699d2f82260d59c383 **/ 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(