libtool
[Top][All Lists]
Advanced

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

Re: export_dynamic_flag_spec


From: Gary V. Vaughan
Subject: Re: export_dynamic_flag_spec
Date: Thu, 10 Jun 2010 02:26:52 +0700

Hi Sam,

On 10 Jun 2010, at 01:51, Sam Steingold wrote:
> how can I get the value of export_dynamic_flag_spec substituted by configure?
> I have this in my configure.in:
> 
> AC_LIBTOOL_DLOPEN_SELF dnl do I even need this?!
> AC_PROG_LIBTOOL
> EXPORT_DYNAMIC_FLAG_SPEC=$export_dynamic_flag_spec
> AC_SUBST(EXPORT_DYNAMIC_FLAG_SPEC)dnl
> 
> and this in my foo.sh.in file:
> 
> EXPORT_DYNAMIC_FLAG_SPEC='@EXPORT_DYNAMIC_FLAG_SPEC@'
> 
> alas, instead of
> 
> EXPORT_DYNAMIC_FLAG_SPEC='-Wl,--export-dynamic'
> 
> foo.sh contains this:
> 
> EXPORT_DYNAMIC_FLAG_SPEC='${wl}--export-dynamic'
> 
> which is obviously wrong.

No, it's quite deliberate.  That way when we link with the compiler driver
we can say:

  wl=-Wl,
  eval $CC .... $export_dynamic_flag_spec ...

and when we want to link by calling the linker directly we can say:

  wl=
  eval $LD ... $export_dynamic_flag_spec ...

> So, how do I get the full correct value of export_dynamic_flag_spec?

Choose or extract an appropriate value for $wl from libtool, something along
the lines of:

  eval `libtool --tag=CC --config|grep '^wl='`

Generally when a libtool variable name ends with '_spec', that means it
relies on being evaluated with an appropriate environment before use.

Cheers,
-- 
Gary V. Vaughan (address@hidden)        


reply via email to

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