aboutsummaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:02:52 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:02:52 +0000
commit8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a (patch)
treecab3e474e8e7fa29f27061fd6bbaa22e96e6711a /Makefile.flags
parent52a4388d95436c268a3488c6ff00e4641afd12d3 (diff)
downloadbusybox-8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a.tar.gz
add -fpic to CC flags when we build libbusybox (14% smaller .so)
Diffstat (limited to 'Makefile.flags')
-rw-r--r--Makefile.flags6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.flags b/Makefile.flags
index 529491557..243f095e2 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -56,6 +56,12 @@ ifeq ($(CONFIG_DEBUG),y)
CFLAGS += $(call cc-option,-g)
endif
+# on i386: 14% smaller libbusybox.so
+# (code itself is 9% bigger, we save on relocs/PLT/GOT)
+ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
+CFLAGS += -fpic
+endif
+
ifeq ($(CONFIG_STATIC),y)
LDFLAGS += -static
endif