This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
How can I link the binutils using the static 'libc.a' instead of the dynamic 'libc.so'?
- From: "Martin J. O'Riordan" <martin dot oriordan at movidius dot com>
- To: <binutils at sourceware dot org>
- Date: Wed, 26 Apr 2017 10:02:04 +0100
- Subject: How can I link the binutils using the static 'libc.a' instead of the dynamic 'libc.so'?
- Authentication-results: sourceware.org; auth=none
I am building Binutils v2.27, but need to have the executables linked
against the static 'libc.a' rather than the default which uses the dynamic
'libc.so'.
How can I instruct 'configure' to do this? Is it even possible?
I have experimented with setting CFLAGS, CFLAGS_FOR_BUILD,
CFLAGS_FOR_TARGET, LDFLAGS, LDFLAGS_FOR_BUILD and LDFLAGS_FOR_TARGET to
'-static' and/or '-static-libgcc' but 'ldd' still shows the executables as
being bound to '/lib64/libc.so.6'.
My build system is "CentOS Linux release 7.1.1503" and the installed version
of GCC is "gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)".
Thanks,
MartinO