Patchwork Add -static to LDFLAGS when prefering static binaries

login
register
mail settings
Submitter Phil Edworthy
Date March 21, 2012, 3:10 p.m.
Message ID <1332342642-7717-1-git-send-email-phil.edworthy@renesas.com>
Download mbox | patch
Permalink /patch/147991/
State Superseded
Headers show

Comments

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

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