From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2779 invoked by alias); 4 May 2006 13:15:32 -0000 Received: (qmail 2627 invoked by uid 48); 4 May 2006 13:15:05 -0000 Date: Thu, 04 May 2006 13:15:00 -0000 Message-ID: <20060504131505.2626.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug driver/27419] '-static' for 'gcc libraries' only? In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00356.txt.bz2 List-Id: ------- Comment #1 from pluto at agmk dot net 2006-05-04 13:15 ------- (In reply to comment #0) > Hi! > > I would be interested in having the "gcc libraries" statically linked to my > binary, but still use one shared-object (a commercial library for which no > static version is available), so '-static' is not really an option, as far as I > can tell... e.g. libfoo.so is a commercial shared library. $ ldd libfoo.so libc.so.6 => /lib64/libc.so.6 (0x00002b388050d000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) $ cat exec.c extern void foo(); int main() { foo(); return 0; } $ gcc exec.c -o exec -static-libgcc -Wl,-rpath,. -L. -lfoo $ ldd exec libfoo.so => ./libfoo.so (0x00002b795f7fc000) libc.so.6 => /lib64/libc.so.6 (0x00002b795f917000) /lib64/ld-linux-x86-64.so.2 (0x00002b795f6e1000) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419