bug-gnulib
[Top][All Lists]
Advanced

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

Re: ld-output-def


From: Simon Josefsson
Subject: Re: ld-output-def
Date: Wed, 01 Apr 2009 06:50:07 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Hi Simon, Ralf,
>
> Your documented example looks like this:
>
>> +if HAVE_LD_OUTPUT_DEF
>> +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def
>> +defexecdir = $(bindir)
>> +defexec_DATA = libfoo-$(SOVERSION).def
>> +DISTCLEANFILES += $(defexec_DATA)
>> +endif
>
> What is $(SOVERSION) ? As I understand it, libfoo-$(SOVERSION).def should
> match the basename of libfoo-$(SOVERSION).dll, right? But that basename is
> determined by libtool from the L:T:V triple that gets passed as
> -version-info argument, in an undocumented (platform dependent) way.

I forgot this aspect.  The application needs to compute the SOVERSION
field from the values passed to libtool.  Assuming the projects uses:

AC_SUBST(LT_CURRENT, 1)
AC_SUBST(LT_REVISION, 1)
AC_SUBST(LT_AGE, 0)
...
libgss_la_LDFLAGS = -no-undefined \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)

It can compute the SOVERSION value as follows:

SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(SOVERSION)

I'll include this in an updated version of the patch.

> Right? Then, the --output-def functionality should be available
> through libtool. We are not supposed to define and update manually an
> SOVERSION macro that is actually the result of some computations done by
> libtool.

DEF files are only relevant for windows targets, so I don't see any
point in having this functionality in libtool?

/Simon




reply via email to

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