From patchwork Wed Mar 21 15:10:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Add -static to LDFLAGS when prefering static binaries From: Phil Edworthy X-Patchwork-Id: 147991 Message-Id: <1332342642-7717-1-git-send-email-phil.edworthy@renesas.com> To: buildroot@busybox.net Date: Wed, 21 Mar 2012 15:10:42 +0000 Signed-off-by: Phil Edworthy --- 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