add -fpic to CC flags when we build libbusybox (14% smaller .so)
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 11 Oct 2007 10:02:52 +0000 (10:02 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 11 Oct 2007 10:02:52 +0000 (10:02 -0000)
Makefile.flags

index 5294915..243f095 100644 (file)
@@ -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