[Top][All Lists]

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

Problem with "fixed" -static flag

From: Gary Kumfert
Subject: Problem with "fixed" -static flag
Date: Thu, 12 Jan 2006 12:07:52 -0800 (PST)


I'm learning that libtool 1.5.22 "fixed" the -static flag so that
static libraries are linked in the build directory, but
shared libraries in the install directory.  But I don't
understand why this is considered "better" behavior.
The side-effect is that libtool behaves very
differently between "make check" and "make installcheck"
...particularly in my case, since the libraries being linked
have #ifdef PIC preprocessor directives in their source.

I thought the -all-static flag would be a solution, but it
seems to go too far... trying to link in *every* library (even
system libraries) statically.
glibc (and other libs that dlopen modules internally) protest
vociferously on the link line (how do they do that?) and
ultimately break my build.

I'm at the point of hacking in my own -lt-static flag to
reproduce the old behavior of -static.... but first I wanted
to do a sanity check.

  1. Am I the only one who prefers the older behavior?

  2. Is there another way to make just the libtool libraries static
     after they've been installed?

  3. Could there be an alternative way to structure the libraries?
        I haven't gotten into the details of my code here,
        but folks who want to persue this further...
        (or wonder why there's "#ifdef PIC" in the source)
        are free to contact me.



  Gary Kumfert, Ph.D.                               <address@hidden>
  Center for Applied Scientific Computing          phone: 925-424-2580
  Lawrence Livermore National Laboratory           fax:   925-423-8019
  P.O. Box 808,    L-550
  Livermore, CA 94551-0808

reply via email to

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