gzip: fix a case where tar xzf fails (we use uninitialized fd)
[oweals/busybox.git] / Makefile.flags
index 529491557eed11d884b148c9f3c582bba606d0bf..c023299d737be6703bfa52653917393711b9cb81 100644 (file)
@@ -56,6 +56,15 @@ ifeq ($(CONFIG_DEBUG),y)
 CFLAGS += $(call cc-option,-g)
 endif
 
+ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
+# on i386: 14% smaller libbusybox.so
+# (code itself is 9% bigger, we save on relocs/PLT/GOT)
+CFLAGS += -fpic
+# and another 4% reduction of libbusybox.so:
+# (external entry points must be marked EXTERNALLY_VISIBLE)
+CFLAGS += $(call cc-option,-fvisibility=hidden)
+endif
+
 ifeq ($(CONFIG_STATIC),y)
 LDFLAGS += -static
 endif