From patchwork Mon Mar 9 12:37:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 5966801 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC7D79F318 for ; Mon, 9 Mar 2015 12:34:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B858200E1 for ; Mon, 9 Mar 2015 12:34:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9A62C2013D for ; Mon, 9 Mar 2015 12:34:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 850706E2DE; Mon, 9 Mar 2015 05:34:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EC696E2DE for ; Mon, 9 Mar 2015 05:34:35 -0700 (PDT) Received: by wggx12 with SMTP id x12so16978380wgg.13 for ; Mon, 09 Mar 2015 05:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tkw6u2jEvfiq35z5QAGipdx+LaHY/hsW9wVuIRMuRjs=; b=lpfrnyJrkZuaRKsM8S+fJRHl9BDWRxbpF2sShMQUULIm7oYEksUAFHZNkvTiKRlZhI 5wjHWtGRzbYOZXVMjeq9XRqxJX3kyWbgibN1VcbbWdlKTBWK0vBEzAfwWQ40JxCNP7BT W/iefGPwIWdZX42KX9YtvYIs5NcvR4Kw7xAtamehsDVNt4NmuMbTKIjWc4SE5jiSZ+8A gS8M0VvO06ski7o8Vbfni1cYq4JMGeAO+tTsSn6F2XFwf5QjZ8ysG7Sc81RBzrjNz+Mo JuvxyLnd7C4mea8iXv8fu8ylsM3zspr8b4B3Cj2Yui7Qbbi8KnMKf+hmyUefytFqkuDs VI8w== X-Received: by 10.180.219.102 with SMTP id pn6mr58353657wic.50.1425904474441; Mon, 09 Mar 2015 05:34:34 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id ax10sm28088375wjc.26.2015.03.09.05.34.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2015 05:34:33 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/2] configure.ac: set VISIBILITY_CFLAGS for SUNCC Date: Mon, 9 Mar 2015 12:37:40 +0000 Message-Id: <1425904660-13743-2-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1425904660-13743-1-git-send-email-emil.l.velikov@gmail.com> References: <1425904660-13743-1-git-send-email-emil.l.velikov@gmail.com> Cc: Alan Coopersmith , emil.l.velikov@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For non-GCC (Sun) compilers check for "-xldscope=hidden". Use it if supported to hide the internal symbols. Cc: Alan Coopersmith Signed-off-by: Emil Velikov --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 1fcc8de..91c6662 100644 --- a/configure.ac +++ b/configure.ac @@ -405,6 +405,19 @@ if test "x$GCC" = xyes; then # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. CFLAGS=$save_CFLAGS AC_SUBST([VISIBILITY_CFLAGS]) +else + # Enable -xldscope=hidden if using a compiler that supports it (SUNCC) + save_CFLAGS="$CFLAGS" + AC_MSG_CHECKING([whether $CC supports -xldscope=hidden]) + VISIBILITY_CFLAGS="-xldscope=hidden" + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]); + + # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. + CFLAGS=$save_CFLAGS + AC_SUBST([VISIBILITY_CFLAGS]) + fi AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))])