From patchwork Mon Mar 9 12:37:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 5966791 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 378459F318 for ; Mon, 9 Mar 2015 12:34:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFB1820154 for ; Mon, 9 Mar 2015 12:34:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 44C20200E1 for ; Mon, 9 Mar 2015 12:34:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D4566E2DF; Mon, 9 Mar 2015 05:34:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 694336E2DE for ; Mon, 9 Mar 2015 05:34:34 -0700 (PDT) Received: by wibbs8 with SMTP id bs8so19730979wib.0 for ; Mon, 09 Mar 2015 05:34:33 -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; bh=nRk3RbviH2DqgMbdpTzX5/5s2aSEsd6p8hQ8VIRI034=; b=r6C1U20syK833GXS9k3/pSQnRzSvVzhuFkRoRQYvcQzcpzz5e+OTGmWLHrgdIbkkQn 2Sb9NaeCDPwXW+VdWKT1I8Ao3V/fDdcRyljSlpBXKTgEafhx59u0Pvva0bPNAMtoPCLz geFG3VdoqXxnfa0OSBbcwfdbLQTLNwUmxiEyFxSZbk4ZclWLX4Xt9aBX5ej7zgsN7THH sdudTyza6H2a2BbXDAupOn6m6jZX4IBurIWtKu+p7oKA532Y4ihH/jNDxWoWrAIc2TqP jPFZ3PITJzjk3YUe+HUFZj806gUV7+DmLE3tRkVdNoqkIZA76d9f+a3RC7rgY7HMm8sb av9Q== X-Received: by 10.180.73.205 with SMTP id n13mr58922568wiv.64.1425904473315; Mon, 09 Mar 2015 05:34:33 -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.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2015 05:34:32 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 1/2] configure.ac: split -fvisibility and __attribute__((visibility)) checks Date: Mon, 9 Mar 2015 12:37:39 +0000 Message-Id: <1425904660-13743-1-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 Cc: Alan Coopersmith , Thierry Reding , 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 The former does not imply the latter and vice-versa. One such example is the Sun compiler. Cc: Alan Coopersmith Cc: Thierry Reding Signed-off-by: Emil Velikov --- Hi Alan, Can you please take a look it this series covers the symbol visibility issues mentioned earlier ? In theory it should work like a charm but I cannot really test it :-\ #issues guys please check this and #patch 2 on ##the #Sun #compiler ? #In #theory it should work like a charm, but I cannot really test it :-\ Additionally can you guys build libdrm (barring the patch you sent the other day), or you need some parts of this ancient patch http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/libdrm/files/libdrm-2.4.58-solaris.patch?view=markup Cheers, Emil configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 00685fd..1fcc8de 100644 --- a/configure.ac +++ b/configure.ac @@ -404,12 +404,17 @@ if test "x$GCC" = xyes; then # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. CFLAGS=$save_CFLAGS + AC_SUBST([VISIBILITY_CFLAGS]) +fi - if test "x$VISIBILITY_CFLAGS" != x; then - AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler has -fvisibility support]) - fi +AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ + int foo_default( void ) __attribute__((visibility("default"))); + int foo_hidden( void ) __attribute__((visibility("hidden"))); +], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])]); - AC_SUBST([VISIBILITY_CFLAGS]) +if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then + AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))]) fi AC_SUBST(WARN_CFLAGS)