[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: providing a libidn compatibility API

From: Tim Ruehsen
Subject: Re: providing a libidn compatibility API
Date: Tue, 14 Feb 2017 10:07:43 +0100
User-agent: KMail/5.2.3 (Linux/4.9.0-1-amd64; KDE/5.28.0; x86_64; ; )

On Tuesday, February 14, 2017 8:00:26 AM CET Nikos Mavrogiannopoulos wrote:
> On Mon, Feb 13, 2017 at 7:57 AM, Nikos Mavrogiannopoulos
> <address@hidden> wrote:
> >> It turned out that if libunistring is linked, this extra code is still
> >> added to libidn2, just blowing up the size without any advantage. Simon
> >> and I didn't have (fast) solution to that, so we commented the extra
> >> gnulib modules in bootstrap.conf.
> > 
> > Interesting, that would affect gnutls as well since it is also using
> > libunistring that way.
> Actually it doesn't. I had made a separate library with unistring
> which was only being included if libunistring was not available. I
> attempted to do something similar for libidn2 at:
> Note however that in libidn2 you had two states. Have libunistring
> available with uc_joining_type imported from a local copy from
> unistring (latest), and have libunistring containing everything. For
> the simplicity of the fix above, I've switched to have a sufficiently
> new libunistring, vs have no libunistring. That means of course that
> the newer (and bigger) libunistring will enter on systems without
> 0.9.6.

Libidn2 is built with libtool which uses the linker flag --whole-archive for 

libtool: link: gcc -shared  -fPIC -DPIC  .libs/idna.o .libs/decode.o .libs/
lookup.o .libs/register.o .libs/bidi.o .libs/version.o .libs/error.o .libs/
punycode.o .libs/free.o .libs/data.o .libs/tr46map.o .libs/tables.o .libs/
context.o  -Wl,--whole-archive lib/.libs/libgnu.a -Wl,--no-whole-archive  -
lunistring  -g -Wl,--version-script=./   -Wl,-soname -Wl, 
-o .libs/

This adds everything from libgnu.a to, if needed or not.

The issue is gone when removing --whole-archive. Everything links fine and the 
tests work. But I have no clue how to tell libtool that it should not use --
whole-archive. Any idea ?

The issue could be solved either in gnulib (not adding unneeded stuff to 
libgnu.a) or libtool (not using --whole-archive).

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]