From patchwork Thu Oct 5 10:00:01 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: 114872 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp52303edb; Thu, 5 Oct 2017 03:08:13 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA/XvmdFUfiwEX3qEIfzh/aJVjU/IsIUs7nnzOUEYBx9u1DACcSJET6IPU/JHpXg5p4Kupt X-Received: by 10.200.36.164 with SMTP id s33mr19183580qts.108.1507198093518; Thu, 05 Oct 2017 03:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507198093; cv=none; d=google.com; s=arc-20160816; b=y5eLRcyb1YzoNr588VW8z5k3DNHW6jWjR/b086XNmk1pVuAUHVvIyAGr5L26YL/KiZ 7wGDm9uON1FypAnCQT+ANGSR8SJZcDJIMgIrFy7gU2FRjC3yJ3q1vuK7D7UZelT1LULc KPYnyCVErJq/jYNT3gmRhsiRFdRy04aFzeMNVR6vCL+ntmcfnyAZfjEroPAfh5phAe+N ofUJ7pzFkvyyN/fA+30S/ey54k1Q7Dc88v0Dji1MCye1+DoBhmkpSkvvYnAQ3tKhfgRg SLfvgV1blJWaEUwS4G2dRO7H16LmKZ4LRY6e8Gxlm5T7NimkOd9y2qTlvyHAUTDBdHPu K/KA== 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=RtDOcYeDHa1fec2T1oLt8RGAwtPZif44C1kFwYP1cg0=; b=KbpAxZfRrkvCJCnfLj+08vNpdeoyYyluJ5FzxksCPv/LPQDIw0LLRk/E+JhFWyn8d6 PaPJzdTnpGH+TOTOA+3cu8fdWioVlSXQ6aXINnWvS7mUxSp7uo5F1WyejAexbjtPlEHA jOreqAKX3oaEGIUX+GHmNVZzDMPImLJi8Veha/QBRlfC9VGm0N9BZO5gwjg9yJFThLsf IAd5ndVhJAbrqk7mlBwCAzGBtXaEGjz0V+hbVSI5VrF2JkzHG8hJmu3xkNAwwC9+Bzbk 8bacIvQsBDtIIN/YItGowlM5UCw9+TFABjD2mB2Dl/2nU32c3iF8wEezw+/TjeZ0ZpHI HtGw== 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 y53si927340qtj.403.2017.10.05.03.08.13; Thu, 05 Oct 2017 03:08:13 -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 2471A644B6; Thu, 5 Oct 2017 10:08:13 +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,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 4F8B8644D7; Thu, 5 Oct 2017 10:01: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 C3A77644CA; Thu, 5 Oct 2017 10:01:28 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 2197360BEE for ; Thu, 5 Oct 2017 10:00:31 +0000 (UTC) Received: from mxback10j.mail.yandex.net (mxback10j.mail.yandex.net [IPv6:2a02:6b8:0:1619::113]) by forward102j.mail.yandex.net (Yandex) with ESMTP id B7C96560264C for ; Thu, 5 Oct 2017 13:00:29 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback10j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ixvS1dhLT5-0TiKJ8nQ; Thu, 05 Oct 2017 13:00:29 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id DGg9opEbVV-0Tqu69Jl; Thu, 05 Oct 2017 13:00:29 +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 13:00:01 +0300 Message-Id: <1507197617-6215-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507197617-6215-1-git-send-email-odpbot@yandex.ru> References: <1507197617-6215-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 213 Subject: [lng-odp] [PATCH v2 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: f77d26100249d410e863b9db7a1a41fdad922e03 **/ 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(