Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding (compiling) a module to already build Zsh
- X-seq: zsh-workers 39328
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Adding (compiling) a module to already build Zsh
- Date: Wed, 14 Sep 2016 21:03:16 +0200
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kgn0VX0XW5kyL6uEOrWO93+KZ9SJqwNlktBs2pitwyg=; b=PpFF/h0/51d1Ru9FH/3gGgF3g1Rzk3EazOr4rQpbJYrgRxz5YzTcoWmryaq5ojh2k1 k+ov9yFrfYWy92hGzmg4n+gXnIp3dSGg0lGnJg9u1quVpbvWLbOl1Bf9eSNcn/egtpO8 9ae5Y77bs4VUP14QFZvcu3mR0fTpwfyV0VTY7414rBC+7bHaa5c0bjis0vkajHzm+gzr ZXXe9pONpDRcTRBY7G7qxDu/193LCAe5A7dZ135EFKpUKb+5HHZLkBj8YdHi4HlssCuM vAOAC9XcIP4vO1CpIV1miZzaSD0gi2LfcQbozuYVtHxvTi9jjDdnyQMcpemEX4gcCVJU I9oQ==
- In-reply-to: <45670.1473843287@hydra.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVB+A2Pzjz5GF8MLT2j=fz+0JSLK9k2vkx2bt6ENRzirMw@mail.gmail.com> <160912103839.ZM25202@torch.brasslantern.com> <CAKc7PVCy4R=Frg1FH_iBaT-BiWiO13p27VDyPX_x9AkT9rCX0w@mail.gmail.com> <45670.1473843287@hydra.kiddle.eu>
On Wed, Sep 14, 2016 at 10:54 AM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Sebastian Gniazdowski wrote:
>> > On Sep 12, 8:12am, Sebastian Gniazdowski wrote:
>
>> > } I think gdbm and pcre add linkage to additional libraries to
>> > } the Zsh binary itself.
>
> You can usually prevent that with something like
> LDFLAGS='-Wl,--as-needed'
> Depending on you linker, the option might be -zignore.
>
> Or you can retrospectively remove the library from the NEEDED list with
> a tool like patchelf.
>
> The limitation is really with autoconf or at least our use of it.
> We add checks for libraries such as pcre and it adds -lpcre to the
> global list of linker options. I don't know whether anything has changed
> in autoconf to make it easier to limit that so it would only be used
> when linking the pcre module - anyone?
http://cgit.mika.l3ib.org/cgit/zsh-cvs/commit/?h=a095c720fff0893b9f1ca3f96bb28de125aa155f
I did this at least 5 years ago so I didn't know as much then as I do
know about autoconf, but I think AC_CHECK_LIB is a convenience macro
for something that first checks if a lib is linkable, and then adds it
to the list of things to link to globally. We could just expand those
to the full thing that only does the check without adding, and since
the lib is always the same, the part of the patch that has the
unconditional lib names in the .mdd files should be fine?
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Libraries.html
ah, actually we can just provide the action-if-found action and it
won't add the name to LIBS for us, even better.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author