Ralf Wildenhues <ralf.wildenh...@gmx.de> writes:

> * Rainer Orth wrote on Wed, Nov 17, 2010 at 09:15:55PM CET:
>> 
>> * One cannot -lm to libquadmath_la_LIBADD since that gets passed to nm,
>>   which doesn't know (and doesn't need to be run) -lm.
>
> That's a bug in the rule using nm then, though.

I'm not completely sure about this.  One might skip such arguments in
the contrib/make_sunver.pl script, though.

>>   Again, as in
>>   libjava/Makefile.am, I've moved it to libquadmath_la_LDFLAGS instead.
>
> Using *_LDFLAGS for -l flags is wrong though because it might mess up
> the ordering of libraries, at least for static linking.  You might get
> away with this here because -lm is probably added from some other bit as
> well, but in general that is not a good idea.

As I've mentioned in the submission of the patch that added
Solaris-style symbol versioning to libjava

        [build, libjava] Support Sun symbol versioning in libjava
        http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00073.html

the Automake manual can be read otherwise: ch. 8.3.7 `_LIBADD',
`_LDFLAGS', and `_LIBTOOLFLAGS' states:

  As shown in previous sections, the `LIBRARY_LIBADD' variable should be
  used to list extra libtool objects (`.lo' files) or libtool libraries
  (`.la') to add to LIBRARY.

     The `LIBRARY_LDFLAGS' variable is the place to list additional
  libtool linking flags, such as `-version-info', `-static', and a lot
  more.  *Note Link mode: (libtool)Link mode.

There's nothing about external libraries specified with just -l<lib> in
the first sentence about _LIBADD.

As I said, I could be persuaded to change this, but right now my primary
interest is to get Solaris back to bootstrap land ASAP, and with less
than 13000 testsuite failures ;-(

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to