cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [RFC PATCH] symbols versioning

From: Alessandro Ghedini <al3xbio_at_gmail.com>
Date: Fri, 16 Dec 2011 17:35:21 +0100

On Thu, Dec 15, 2011 at 05:56:35PM +0100, Daniel Stenberg wrote:
> On Wed, 14 Dec 2011, Alessandro Ghedini wrote:
>
> >in Debian we have been carrying for quite some time a patch that
> >allows, at configuration time, the "production" of versioned
> >symbols for the different flavours of SSL libraries supported [0].
> >It was even submitted for merging at some point [1] and Daniel
> >showed some interest and also presented some remarks but
> >apparently it all ended there (i.e. the patch was not merged).
>
> There was never any updates presented so my objections remained...
>
> >At this point the patch is not in a much better state then it was
> >at the time, but before starting to work on it to get it in shape,
> >I'd like to know if there is still some interest in it. Are there
> >any chances it will be merged, premised that all the problems get
> >fixed?
>
> Sure, this option seems harmless for uninterested users and it could
> be useful for some, so I could indeed see it getting merged.
>
> My comments on this generation of the patch:
>
> 1 - The warning on line 22-23 seems to assume that --with-gnu-ld can be used
> which we really cannot know. I suggest a more generic error message that
> will work even for non-gnu compilers and linkers.

Would something like "You should use a GNU ld compatible linker to enable
symbols versioning." be ok?

> 2 - The condition on line 56 needs to be modified to not evaluate a blank
> string. Like this:
>
> AM_CONDITIONAL(VERSIONED_SYMBOLS, test "x$versioned_symbols" = "xyes")

Ok.

> 3 - lib/libcurl.vers.in would need to be added to lib/Makefile.am to get
> shipped in release tarballs

Ok.

I've also added the other SSL flavours missing (PolarSSL, CyaSSL, AxTLS).

Regarding your previous remarks [0], I am not sure what would be the best
ways to address points 1 and 2.

For point 1 I may test the output of the call to "$LD --version-script=file"
but this is not optimal since different linkers usually have different
outputs (e.g. ld and gold).

For point 2 I am testing whether the compiler is gcc, clang, icc or tcc, but
it doesn't look like the best way to me (also, I may have missed other
usable compilers).

Any idea?

Thanks

[0] http://curl.haxx.se/mail/lib-2005-09/0176.html

-- 
perl -E'$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-16