package infra: add -static to C/CXXFLAGS
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sun, 25 May 2014 22:13:00 +0000 (19:13 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Jul 2014 18:25:10 +0000 (20:25 +0200)
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Makefile.in

index 427c6d84d79c9460307060039525faa66ae242dc..02f6e3d62c4237a7c96625e745b1fe69ed36f83b 100644 (file)
@@ -374,6 +374,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