xorg/xserver - [PATCH] Make public/default visibility symbols used by different modules.

pcpa at mandriva.com.br pcpa at mandriva.com.br
Sun Feb 3 13:31:52 PST 2008


  This patch may require the other patches I posted to apply cleanly.
  But to ensure symbols are visible
0002-Rework-code-deferencing-return-value-of-LoaderSymbol.patch
0003-Ensure-symbols-that-replace-weak-symbols-in-librarie.patch
should be enough.

  Actually, Patch 2 could require some rework because there is only
one ocurrence of _X_EXPORT in <destdir>/include/xorg/*.h, so it could
be desirable to remove for the headers in patch 2 also.

  I know this patch will not work, if code compiled with hidden symbols,
with a few modules that are not in Xorg, these include nvidia binary
driver, vnc module, wacomm. But I did not try to compile or use any of
them with git master, I know the required changes for the 1.4 server.

  There are other symbols that are required to be exported, but since
the drivers that require them don't build, I only listed in this patch
the ones required for everything that builds with source less than
one week old.

  I also did not distinguish from definitions that are installed
in <destdir>/include/xorg from those that aren't. This patch should
be at least useful to have an idea of what modules require. But a proper
implementation probably would be to ensure what is exported in the
sdk is really made of public/default visibility, and what isn't,
but required, either added to the sdk or modules that required it
fixed.

  I am not sure what would be the proper way to define the compiler
flags. The patch I am using requires changing AM_CFLAGS so it can
be set per directory Makefile, but it could be desirable to have it
as a global flag to avoid changes to Makefiles.

  Note also that I did not modify, in this patch, code outside
hw/xfree86, but presuming fvisibility is supported on the other builds,
the changes should not affect them.

  This patch is mainly an attempt to help in providing a stable api.


  I was also considering to split this patch in a version that can
find symbols using tags and another that requires looking at the source
code to understand macro expansions, but at the end I preferred to
make a single patch.

  I also tried to keep it very minimal and without noise, besides some
temptation to change K&R definitions do ANSI definitions in some places,
and a few other changes.

Paulo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Make-public-default-visibility-symbols-used-by-diffe.patch.gz
Type: application/x-gzip
Size: 23422 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080203/05b968b5/attachment.bin>


More information about the xorg mailing list