[Buildroot] [PATCH] Add -static to LDFLAGS when prefering static binaries

Phil Edworthy phil.edworthy at renesas.com
Wed Mar 21 15:10:42 UTC 2012


Signed-off-by: Phil Edworthy <phil.edworthy at 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(-)

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
-- 
1.7.0.4



More information about the buildroot mailing list