Add -static to LDFLAGS when prefering static binaries

Submitted by Phil Edworthy on March 21, 2012, 3:10 p.m.

Details

Message ID 1332342642-7717-1-git-send-email-phil.edworthy@renesas.com
State Superseded
Headers show

Commit Message

Phil Edworthy March 21, 2012, 3:10 p.m.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
Tested fbv and strace using sh-uclinux-gcc (Sourcery G++ Lite 2011.03-36)
Without this flag, the binaries were still linked to libc.so.

 package/Makefile.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/package/Makefile.in b/package/Makefile.in
index dc8d038..3690a38 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -294,6 +294,7 @@  endif
 
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared
+TARGET_LDFLAGS+=-static
 else
 SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 endif