<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Mon, 2010-03-22 at 07:52 -0700, Alan Coopersmith wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Gaetan Nadon wrote:
&gt; On Fri, 2010-03-19 at 13:53 -0700, Alan Coopersmith wrote:
&gt;&gt; Gaetan Nadon wrote:
&gt;&gt; &gt; The server sticks -fvisibility compiler flag in the pkg Cflags which
&gt;&gt; &gt; does not help while 99% of pkg-config files on my distro are compiler
&gt;&gt; &gt; flags free.
&gt;&gt;
&gt;&gt; Which is probably a bug in itself - I end up removing @symbol_visibility@
&gt;&gt; from xorg-server.pc.in when building our packages, since we support both
&gt;&gt; gcc &amp; Sun Studio, and they take different flags for that option.
&gt;&gt;
&gt; 
&gt; I tend to agree, providing compiler flags such as this one is pushing
&gt; the &quot;convenience&quot; envelop. This flag should be specified in the driver
&gt; module, but it is significant work. There is no facility to specify a
&gt; portable compiler flag. In this particular case, it could be supplied
&gt; through a server macro and included in each driver makefile.

Yes, the visibility cflags should probably have been added to xorg-macros
(since it's useful for libraries as well as driver modules) and the macro
added to the drivers.

&gt; As a side note, it looks like the server config handles the SUN compilers.
&gt; 
&gt; AC_CHECK_DECL([__SUNPRO_C], [SUNCC=&quot;yes&quot;], [SUNCC=&quot;no&quot;])
&gt; if test x$SUNCC = xyes; then
&gt;     VISIBILITY_CFLAGS=&quot;-xldscope=hidden&quot;
&gt; else
&gt;     have_visibility=no
&gt; fi

Yes, so if I build the X server with Sun compilers and don't patch out that
section, no one can build drivers with gcc (including me, which is why I found
this, since some of the drivers I build cannot be built with Sun compilers and
must use gcc).

</PRE>
</BLOCKQUOTE>
Ah, I came close to that scenario. Isn't that a bug then? It seems easy to fix, but there will be the issue<BR>
of older modules configuring with newer servers without visibility flag. But it does not break anything,<BR>
just larger object code file with the default visibility.<BR>
<BR>
</BODY>
</HTML>