cons-discuss
[Top][All Lists]
Advanced

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

Re: patch for static linking


From: Steven Knight
Subject: Re: patch for static linking
Date: Fri, 31 Aug 2001 08:33:29 -0500 (CDT)

On Fri, 31 Aug 2001, Brad Garcia wrote:
> Attached is a patch that allows cons to recognize static linking
> directives placed in LIBS.  Cons will then correctly search only
> for static versions of libraries, instead of first (incorrectly)
> searching for a dynamic version.
>
> This patch is against a slightly changed version of 2.3.0.
> It should apply cleanly.
>
> Also, this adds some gnu-tool-specific stuff to cons.  If
> someone can think of a better way to generalize it, please
> post to the list.

Why not do it with a cloned environment that sets SUFLIBS to just the
static suffix?

        $static_link = $env->clone(SUFLIBS => '.a');

Or, if that really won't work, code it to control the behavior by
explicitly looking at some other construction variable, not the
gnu-tool-specific options:

        $static_env = new cons (LIBS => '-Wl,-dy',
                                STATIC_LIBS => 1);

Then the behavior can be explicit, regardless of the tool chain used.

        --SK




reply via email to

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