GNU bug report logs - #9728
Incorrect -L flags order for HP-UX

Previous Next

Package: libtool;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 11 Oct 2011 14:00:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Peter O'Gorman <peter <at> pogma.com>
Cc: 9728 <at> debbugs.gnu.org
Subject: bug#9728: Incorrect -L flags order for HP-UX
Date: Fri, 14 Oct 2011 01:06:29 +0200
Hi,

On 2011-10-13 09:06:22 -0500, Peter O'Gorman wrote:
> Well, if this is a bug at all, it is an automake/autoconf one,
> libtool does not set the order of flags in Makefile.in, but I don't
> believe that it is a bug.

The autoconf manual says to use LDFLAGS for the -L options. So, it
is either a bug in the autoconf manual or in automake.

> LDFLAGS, CFLAGS, etc are for the user to set.

And this is what MPFR does with --with-gmp, which is a shorthand
for updating CPPFLAGS and LDFLAGS.

> It should be possible for the user to build a package doing
> ./configure ..options..; make LDFLAGS=-fancyflag
> CPPFLAGS=-I/want/coffee;

I don't think this should be allowed: MPFR does some tests at
configure time based on the current environment. If the user
modifies the environment at make time, the configure tests no
longer make sense (e.g. modifying LDFLAGS at make time can select
a different GMP version). So, if the user does this, it is up to
him to make sure that the changes are equivalent to what was set
at configure time.

> Something like the attached patch should work for mpfr.

There are several problems with it. First, I assume that LOADLIBES
should contain $(AM_CPPFLAGS) too. But the main problem is the
inconsistent flags order: in the compile command, $(AM_CPPFLAGS)
appears before $(CPPFLAGS), while in the link command, $(GMP_LIBS)
appears after $(LDFLAGS). This means that if the user uses both
--with-gmp and CPPFLAGS/LDFLAGS to provide search directories,
the include and library search paths will be inconsistent.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - 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)




This bug report was last modified 13 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.