pscan: size optimization (Tito <farmatito@tiscali.it>)
[oweals/busybox.git] / Makefile.flags
index e4ca7c6c5ac9c83b197687fccca132b22fbd0f8b..c9b713b029b22d2faf877277085ce4969b792b7a 100644 (file)
@@ -3,6 +3,7 @@
 # ==========================================================================
 
 BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+SKIP_STRIP = n
 
 # -std=gnu99 needed for [U]LLONG_MAX on some systems
 CPPFLAGS += $(call cc-option,-std=gnu99,)
@@ -54,4 +55,27 @@ endif
 ifeq ($(CONFIG_STATIC),y)
 LDFLAGS += -static
 endif
+
+ifeq ($(CONFIG_SELINUX),y)
+LDLIBS += -lselinux -lsepol
+endif
+
+ifeq ($(CONFIG_EFENCE),y)
+LDLIBS += -lefence
+endif
+
+ifeq ($(CONFIG_DMALLOC),y)
+LDLIBS += -ldmalloc
+endif
+
 #LDFLAGS += -nostdlib
+
+LDFLAGS_ELF2FLT = -Wl,-elf2flt
+ifneq (,$(findstring $(LDFLAGS_ELF2FLT),$(LDFLAGS)))
+SKIP_STRIP = y
+endif
+
+# Busybox is a stack-fatty so make sure we increase default size
+# TODO: use "make stksizes" to find & fix big stack users; should
+#       just steal scripts/checkstack.pl from the kernel ...
+FLTFLAGS += -s 20000