All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alan Coopersmith <alan.coopersmith@oracle.com>, emil.l.velikov@gmail.com
Subject: [PATCH libdrm 2/2] configure.ac: set VISIBILITY_CFLAGS for SUNCC
Date: Mon,  9 Mar 2015 12:37:40 +0000	[thread overview]
Message-ID: <1425904660-13743-2-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1425904660-13743-1-git-send-email-emil.l.velikov@gmail.com>

For non-GCC (Sun) compilers check for "-xldscope=hidden". Use it if 
supported to hide the internal symbols.

Cc: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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))])
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-03-09 12:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 12:37 [PATCH libdrm 1/2] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
2015-03-09 12:37 ` Emil Velikov [this message]
2015-03-20 17:30 ` Emil Velikov
2015-03-23  1:48   ` Alan Coopersmith
2015-03-23  1:46 ` Solaris & " Alan Coopersmith
2015-03-26 15:46   ` Emil Velikov
2015-03-26 16:56     ` randyf
2015-03-26 18:50       ` Emil Velikov
2015-04-01 14:42         ` randyf
2015-04-05 15:16           ` Emil Velikov
2015-04-05 18:33             ` randyf
2015-04-06 16:22               ` Niveditha Rau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425904660-13743-2-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=alan.coopersmith@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.