summaryrefslogtreecommitdiff
path: root/mk/vars.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/vars.mk')
-rw-r--r--mk/vars.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index ffb26fb18..537633139 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -93,6 +93,11 @@ TARGET_LDFLAGS:= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib \
-Wl,-O1 -Wl,-rpath -Wl,/usr/lib \
-Wl,-rpath-link -Wl,${STAGING_TARGET_DIR}/usr/lib
+# use -static-libgcc by default
+TARGET_CFLAGS+= -static-libgcc
+TARGET_CXXFLAGS+= -static-libgcc
+TARGET_LDFLAGS+= -static-libgcc
+
# security optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
TARGET_LDFLAGS+= -Wl,-z,relro,-z,now
# needed for musl ppc