[RFC] hacking around libtool

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 19:56:08 PST 2016


On 6 December 2016 at 18:19, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
>
> Trying to build the freebsd ports I hit a failure because the php binary
> was not built with --export-dynamic. It turns out the reason was libtool
> looking at the output of -v and --help to decide if it should use
> --export-dynamic or not.

In FreeBSD we had exactly that same kind of problem with libtool and
ELF Tool Chain's strip (https://savannah.gnu.org/patch/?8675,
https://bugs.freebsd.org/198611).

We'll want to get a patch to detect LLD into libtool, but
unfortunately it's a rather slow moving project (it took 9 months to
get the ELF Tool Chain patch committed). If we have a proposed patch
though it can be added to the FreeBSD libtool port. At least the
problem will be solved in FreeBSD while waiting for it to be committed
upstream.

Of course there's also long latency before the updated libtool
percolates into downstream software, but we can have the ports
infrastructure patch the existing instances.

> I have coded the attached patch to work around the problem, but it is
> probably too disgusting to have it in tree.

I had joked about making the strip version output "strip (elftoolchain
r3136M (like GNU strip))". But I agree it's a terrible (albeit useful)
hack. I think we can propose a decent patch to libtool, and if you
don't have a chance to take a look I will after conference travel +
holidays.


More information about the llvm-commits mailing list