[AD] Shared library patch for WIP 3.9.21

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi

Here's a patch for WIP 3.9.21 that adds shared library support.
See the text at the top of the patch for more details.  Briefly
though, there are configure options to build shared libraries,
static libraries, or both; in each mode it will build whichever
of the normal, debugging and profiling libraries are enabled.
Programs can be linked against either shared or static
libraries; if only one mode is being built, that's the only one
that'll be supported.

Now some comments that aren't duplicated in the patch.  The
system that libc uses to link part of itself statically looks
more and more like the best way we can get around the problem of
PICifying the assembly routines.  That's the next thing I intend
to do on the shared library front.  The other half-solution is
to configure with the assembly routines disabled, so that the C
versions are used instead (and compiled with `-fPIC').  But
that'll be slower (in general[!]).

The shared library building code is gcc-only.  I don't know
about any other compilers.  If someone would rather we used
something like libtool, they'll probably have to do that
themselves.

The `misc/dep*' scripts are very cool.  I hope I haven't
tarnished them too much.

I haven't added lines to the install target to install the
shared library because I don't think this is a great idea at the
moment; we'd need to increase the major version number too often
for it to be a useful thing to do, at the current rate of
development.  Or would we -- do people disagree here?  I haven't
thought about it too much.  If we can keep the interface fixed
in our patches, so that the new shared library can be
dynamically linked to older programs (already linked against an
older library), there's no problem.  The obvious way to
coordinate this would be to increment the major version number
with each WIP release from Shawn, but this requires our personal
patches not to change the interface significantly which might
feel restrictive.

But then people making these huge changes can handle that
themselves, and just not use installed shared libraries while
they do this; we can still let people who are using WIPs for
semiserious work install the shared versions, since they'll only
be using unpatched WIPs.  So now I've changed my mind...
Comments very welcome, as always.

My next plans are to add this install support, sort out the
static library for asm functions, and make some changes to the
keyboard driver; I'll try to get all this done before the next
WIP.

Lastly, for anyone who'd like documentation of shared libraries
with GCC/ELF/Linux, I suggest reading parts of the GCC and ELF
HOWTOs.

-- 
George

Attachment: leiloa.gz
Description: application/gunzip



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/