[xorg] Re: CMake (was More about x-packages)

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Dec 22 16:02:06 PST 2007


On 2007-12-22 21:02-0000 Daniel Stone wrote:

> On Sat, Dec 22, 2007 at 11:05:42AM -0800, Alan W. Irwin wrote:
>> Analysis of the X specifics may indicate an obvious way to avoid using this
>> crutch. For example, if large SO modules share extensive code as indicated
>> above, isn't that a strong indication that you should make a real library
>> out of that shared code?  Real libraries are stongly supported by CMake
>> without any need for recompilation, and the end result is a lot easier to
>> understand and maintain in my opinion.
>
> Yes, real libraries are good, but they won't work for the X case due to
> design that assumes everything's linked into the same final object, and
> also due to the fact that they're, well, not real libraries.  We don't
> make API guarantees for internals.

I would appreciate your comments on the following idea, but please be gentle
if I have wandered beyond my depth.  :-)

The idea is to directly replace a convenience library (a collection of
compiled objects according to
http://sourceware.org/autobook/autobook/autobook_92.html) by a real static
library which is private to X.  Of course, assuming the SO modules will need
to be linked to that static library, the static library has to be compiled
with the same compile flags (e.g., -fPIC) used to create the SO modules.
Then I understand that the linking of the SO module with the static library
proceeds by copying the required code from the static library and placing it
in the SO with no necessity of installing the static library or letting its
internals be exposed.  There may be some additional linking options required
to keep the API of the copied static library code within the SO private. But
if my overall mental model of the linking issues is correct, then the above
idea should work. Furthermore, implementing it with CMake would be
straightforward so that lack of convenience library support would no longer
be a CMake deal breaker for X.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



More information about the xorg mailing list