Gentoo Archives: gentoo-user

From: Renat Golubchyk <ragermany@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Building static libraries
Date: Mon, 14 Dec 2009 02:02:50
Message-Id: 20091214012748.314c2eaf@gmx.net
In Reply to: [gentoo-user] Re: Building static libraries by walt
1 On Sun, 13 Dec 2009 14:47:04 -0800
2 walt <w41ter@×××××.com> wrote:
3 > On 12/13/2009 11:18 AM, Renat Golubchyk wrote:
4 > > I need to build a static binary of a program I wrote. The problem is
5 > > that most packages only install dynamic version of the libraries.
6 > > There are the "static" and "static-libs" USE flags...
7 >
8 > I'm confused (not unusual). Do you want to create a Gentoo package of
9 > your program that can be added to portage?
10 >
11 > USE flags are used only by the Gentoo portage system, not by the
12 > compiler or linker that compiles and links your source code.
13 >
14 > If you wrote the program, then you have complete control over the
15 > linker flags (e.g. -static, as Albert mentioned) and those flags
16 > usually are defined in a Makefile (which you create, being the
17 > programmer).
18
19 As you said, you really are confused. :-) Maybe I wasn't clear enough.
20 Anyway, I've written a program, and I need it as a statically linked
21 binary. In order to link statically the linker (ld) needs all the used
22 libraries in static form, i.e. as a .a and not as a .so file. Since
23 portage does not build static libraries by default I need a way to tell
24 portage that I really do want to have .a files built.
25
26 I do _not_ want to create a Gentoo package, at least not at this stage
27 of development.
28
29
30 Cheers,
31 Renat
32
33 --
34 Probleme kann man niemals mit derselben Denkweise loesen,
35 durch die sie entstanden sind.
36 (Einstein)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: Building static libraries Albert Hopkins <marduk@×××××××××××.org>
[gentoo-user] Re: Building static libraries walt <w41ter@×××××.com>