This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: readline build questions


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Charles Wilson on 11/27/2008 6:28 PM:
> Wow. Full circle: back before we had auto-import, I used to maintain
> libreadline in exactly this fashion. It was a PAIN -- I sympathize with
> Eric, because readline has a LOT of symbols that need decorating if you
> go that route.

For now, I went with no decorations in readline, and manually patching the
few instances in bash that try to refer to the address of a function
provided by readline (at least, I hope I found all the instances).

> 
> Further, Chet Ramey felt strongly about NOT uglifying the code with
> those READLINE_IMPEXP symbols everywhere, so at the time those changes
> were forever destined to be maintained out-of-tree, by hand. I don't
> know if Chet has relaxed his position...if not, then I recommend that
> Eric do the following (unless he's just a glutton for punishment):
> 
> 1) Don't explicitly mark symbols as declspec(foo), unless Chet is
> willing to accept the changes

Well, I asked Chet if he will add the uglification for the upcoming
readline 6.0 (now in beta), on the grounds that the gcc manual
*recommends* compiling libraries with -fvisibility=hidden and explicit
__attribute__((__visibility__ "default")).  I still haven't heard back
from him, but if I am successful at convincing him that mainstream Linux
would benefit from the uglification, rather than just fringe cygwin, then
it will be much easier to coerce that uglification into working for
cygwin's needs.

> 2) Do pointer comparisons explicitly against _imp_foo. This will break
> static builds, but at least it will be a much smaller out-of-tree patch
> to maintain in perpetuity.

I did this for bash; no changes needed for readline to do this hack (but
every client that dynamically uses readline must evaluate their code for
any references to functions imported from readline, and do the same hack).

> 3) Drop the static library.

Unless/until readline is uglified with decorations, there's nothing wrong
with providing both static and dynamic.  But I may decide to go with
dynamic-only when readline 6.0 is released, even if Chet doesn't use the
uglification route.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkxgtEACgkQ84KuGfSFAYACnACgrF3RzDVrmVZYi8HM6/lnqIfT
9qsAoMxN2Jguc7wFD0/hG95mclkZwnj+
=11g7
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]