public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Eric Blake <ebb9@byu.net>
To: cygwin-apps@cygwin.com
Subject: Re: readline build questions
Date: Sat, 29 Nov 2008 17:59:00 -0000	[thread overview]
Message-ID: <493182D1.5060106@byu.net> (raw)
In-Reply-To: <492F4942.9010501@cwilson.fastmail.fm>

-----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-----

      reply	other threads:[~2008-11-29 17:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27 16:09 Eric Blake
2008-11-28  1:12 ` Brian Dessent
2008-11-28  1:29   ` Charles Wilson
2008-11-29 17:59     ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493182D1.5060106@byu.net \
    --to=ebb9@byu.net \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).