Patchwork [WIP,5/5] package infra: add -static to C/CXXFLAGS

login
register
mail settings
Submitter Gustavo Zacarias
Date May 25, 2014, 10:13 p.m.
Message ID <1401055980-28742-6-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/352305/
State Accepted
Headers show

Comments

Gustavo Zacarias - May 25, 2014, 10:13 p.m.
Generic infra packages might not use LDFLAGS at all so add -static for
static builds to CFLAGS and CXXFLAGS too.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Makefile.in | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index ec1f22b..ec8fb1b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -373,6 +373,8 @@  endif
 
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared
+TARGET_CFLAGS += -static
+TARGET_CXXFLAGS += -static
 TARGET_LDFLAGS += -static
 else
 SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared