[Top][All Lists]
[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 09:16:05 -0500 (CDT) |
On Fri, 31 Aug 2001, Brad Garcia wrote:
> > Why not do it with a cloned environment that sets SUFLIBS to just the
> > static suffix?
>
> Because it is possible to switch between dynamic linking and static
> linking on a single command line.
>
> For instance:
>
> g++ -o foo a.o b.o -Wl,-Bstatic -lcompat -Wl,-Bdynamic -llib2
>
> The provided patch handles this correctly, switching between searching
> for only static libraries and searching for dynamic, then static as
> these linking options are parsed.
Aha. Okay, then I'll suggest that, rather than making it tool-specific,
we add some construction variables to make the options settable:
new cons(DYNAMIC_ONLY_LIB_FLAGS => ['-Wl,-Bdynamic',
'-Wl,-dy',
'-Wl,-call_shared'],
STATIC_ONLY_LIB_FLAGS => ['-Wl,-Bstatic',
'-WL,-static',
'-Wl,-dn',
'-Wl,-non_shared']);
An obvious extension would be to allow them to be ':' separated as an
alterative.
I'm just really leery about tool-specific stuff in the guts of Cons.
As much as possible, I think we should do stuff through setting (and
therefore creating) appropriate construction variables...
--SK
- patch for static linking, Brad Garcia, 2001/08/31
- Re: patch for static linking, Steven Knight, 2001/08/31
- Re: patch for static linking, Brad Garcia, 2001/08/31
- Re: patch for static linking,
Steven Knight <=
- Re: patch for static linking, Brad Garcia, 2001/08/31
- Modularizing cons (was: patch for static linking), Gary Oberbrunner, 2001/08/31
- RE: Modularizing cons, Greg Spencer, 2001/08/31
- RE: Modularizing cons, Greg Spencer, 2001/08/31
- RE: Modularizing cons, Gary Oberbrunner, 2001/08/31
- RE: Modularizing cons, Greg Spencer, 2001/08/31
- RE: Modularizing cons, Gary Oberbrunner, 2001/08/31
- Re: Modularizing cons (was: patch for static linking), Steven Knight, 2001/08/31
- Re: Modularizing cons, Brad Garcia, 2001/08/31
- Re: Modularizing cons, Steven Knight, 2001/08/31