Subject: Re: bug#9728: Incorrect -L flags order for HP-UX

From: Vincent Lefevre <[email-masked]>
Date: Thu, 13 Oct 2011 12:32:00 +0200

On 2011-10-12 21:52:36 -0500, Peter O'Gorman wrote:
> If the flags were added by the user, they could set LIBS=-L/opt/gnu/lib
> instead on some platfroms, but that won't work on HP-UX either because its
> linker is rather strict that -L flags for paths that contain the library be
> ordered before the -l flag for that library.
> 
> Anyway, the problem can be avoided by not putting the -L and -l flags for
> gmp in LDFLAGS and LIBS, instead put both in e.g. GMP_LIBS,
> (GMP_LIBS="-L/opt/gnu/lib -lgmp"), then add $(GMP_LIBS) to LDADD.

This doesn't work with autoconf's AC_CHECK_LIB and other tests.
And using LDFLAGS for autoconf and LDADD in the Makefile would
be quite hard to maintain due to the risk of inconsistencies.

autoconf and libtool should agree on the way to add -L flags.

-- 
Vincent Lefèvre <[email-masked]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)