Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 1 | # ========================================================================== |
Denis Vlasenko | da8f43f | 2006-10-09 19:47:38 +0000 | [diff] [blame] | 2 | # Build system |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 3 | # ========================================================================== |
| 4 | |
| 5 | BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
Denis Vlasenko | def8898 | 2007-10-07 17:06:01 +0000 | [diff] [blame] | 6 | export BB_VER |
Mike Frysinger | b78d561 | 2010-11-16 09:01:30 -0500 | [diff] [blame] | 7 | SKIP_STRIP ?= n |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 8 | |
Denis Vlasenko | bf11e89 | 2006-11-26 22:17:46 +0000 | [diff] [blame] | 9 | # -std=gnu99 needed for [U]LLONG_MAX on some systems |
Bernhard Reutner-Fischer | 82f8788 | 2007-01-23 11:39:13 +0000 | [diff] [blame] | 10 | CPPFLAGS += $(call cc-option,-std=gnu99,) |
Denis Vlasenko | 9dca07d | 2007-01-27 14:03:15 +0000 | [diff] [blame] | 11 | |
Denis Vlasenko | 7039a66 | 2006-10-08 17:54:47 +0000 | [diff] [blame] | 12 | CPPFLAGS += \ |
| 13 | -Iinclude -Ilibbb \ |
Denis Vlasenko | 4b04f54 | 2008-05-08 16:26:49 +0000 | [diff] [blame] | 14 | $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include -I$(srctree)/libbb) \ |
Denis Vlasenko | 7039a66 | 2006-10-08 17:54:47 +0000 | [diff] [blame] | 15 | -include include/autoconf.h \ |
| 16 | -D_GNU_SOURCE -DNDEBUG \ |
| 17 | $(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \ |
Jean-Philippe Brucker | ed8af51 | 2020-03-12 17:19:45 +0100 | [diff] [blame] | 18 | -DBB_VER=$(squote)$(quote)$(BB_VER)$(quote)$(squote) |
Bernhard Reutner-Fischer | feea1b9 | 2006-12-06 21:51:59 +0000 | [diff] [blame] | 19 | |
Denis Vlasenko | 5599502 | 2008-05-18 22:28:26 +0000 | [diff] [blame] | 20 | CFLAGS += $(call cc-option,-Wall,) |
| 21 | CFLAGS += $(call cc-option,-Wshadow,) |
| 22 | CFLAGS += $(call cc-option,-Wwrite-strings,) |
| 23 | CFLAGS += $(call cc-option,-Wundef,) |
| 24 | CFLAGS += $(call cc-option,-Wstrict-prototypes,) |
Denis Vlasenko | 68404f1 | 2008-03-17 09:00:54 +0000 | [diff] [blame] | 25 | CFLAGS += $(call cc-option,-Wunused -Wunused-parameter,) |
Bernhard Reutner-Fischer | 0d22d17 | 2009-02-18 13:23:46 +0000 | [diff] [blame] | 26 | CFLAGS += $(call cc-option,-Wunused-function -Wunused-value,) |
Denis Vlasenko | e251337 | 2008-05-15 21:44:46 +0000 | [diff] [blame] | 27 | CFLAGS += $(call cc-option,-Wmissing-prototypes -Wmissing-declarations,) |
Mike Frysinger | ca81a93 | 2012-08-04 16:14:24 -0400 | [diff] [blame] | 28 | CFLAGS += $(call cc-option,-Wno-format-security,) |
Denis Vlasenko | 5599502 | 2008-05-18 22:28:26 +0000 | [diff] [blame] | 29 | # warn about C99 declaration after statement |
| 30 | CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
Denis Vlasenko | e251337 | 2008-05-15 21:44:46 +0000 | [diff] [blame] | 31 | # If you want to add more -Wsomething above, make sure that it is |
| 32 | # still possible to build bbox without warnings. |
Denis Vlasenko | c562bb7 | 2007-01-29 17:08:51 +0000 | [diff] [blame] | 33 | |
Denis Vlasenko | 4bb3189 | 2007-02-01 01:51:36 +0000 | [diff] [blame] | 34 | ifeq ($(CONFIG_WERROR),y) |
| 35 | CFLAGS += $(call cc-option,-Werror,) |
Denys Vlasenko | dc3d893 | 2009-08-22 02:34:10 +0200 | [diff] [blame] | 36 | ## TODO: |
| 37 | ## gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) is a PITA: |
| 38 | ## const char *ptr; ... off_t v = *(off_t*)ptr; -> BOOM |
| 39 | ## and no easy way to convince it to shut the hell up. |
| 40 | ## We have a lot of such things all over the place. |
| 41 | ## Classic *(off_t*)(void*)ptr does not work, |
| 42 | ## and I am unwilling to do crazy gcc specific ({ void *ppp = ...; }) |
| 43 | ## stuff in macros. This would obfuscate the code too much. |
Dan Fandrich | 1821d18 | 2010-02-04 04:04:56 +0100 | [diff] [blame] | 44 | ## Maybe try __attribute__((__may_alias__))? |
Denys Vlasenko | dc3d893 | 2009-08-22 02:34:10 +0200 | [diff] [blame] | 45 | #CFLAGS += $(call cc-ifversion, -eq, 0404, -fno-strict-aliasing) |
Denis Vlasenko | 4bb3189 | 2007-02-01 01:51:36 +0000 | [diff] [blame] | 46 | endif |
Denis Vlasenko | c562bb7 | 2007-01-29 17:08:51 +0000 | [diff] [blame] | 47 | # gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() |
| 48 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) |
| 49 | |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 50 | ifneq ($(CC),clang) |
| 51 | # "clang-9: warning: optimization flag '-finline-limit=0' is not supported |
| 52 | CFLAGS += $(call cc-option,-finline-limit=0,) |
| 53 | endif |
| 54 | |
| 55 | CFLAGS += $(call cc-option,-fno-builtin-strlen -fomit-frame-pointer -ffunction-sections -fdata-sections,) |
Denis Vlasenko | e0eebc1 | 2007-01-27 13:44:53 +0000 | [diff] [blame] | 56 | # -fno-guess-branch-probability: prohibit pseudo-random guessing |
Denis Vlasenko | 9dca07d | 2007-01-27 14:03:15 +0000 | [diff] [blame] | 57 | # of branch probabilities (hopefully makes bloatcheck more stable): |
| 58 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 59 | CFLAGS += $(call cc-option,-funsigned-char,) |
| 60 | |
Denys Vlasenko | 39646dc | 2020-12-16 21:53:05 +0100 | [diff] [blame] | 61 | ifeq ($(CONFIG_STATIC_LIBGCC),y) |
| 62 | # Disable it, for example, if you get |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 63 | # "clang-9: warning: argument unused during compilation: '-static-libgcc'" |
| 64 | CFLAGS += $(call cc-option,-static-libgcc,) |
| 65 | endif |
| 66 | |
| 67 | CFLAGS += $(call cc-option,-falign-functions=1,) |
| 68 | ifneq ($(CC),clang) |
| 69 | # "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two) |
| 70 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) |
| 71 | endif |
| 72 | |
Denys Vlasenko | 9b80b90 | 2012-09-04 11:46:44 +0200 | [diff] [blame] | 73 | # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): |
| 74 | CFLAGS += $(call cc-option,-fno-unwind-tables,) |
| 75 | CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) |
Denys Vlasenko | d60752f | 2015-10-07 22:42:45 +0200 | [diff] [blame] | 76 | # No automatic printf->puts,putchar conversions |
| 77 | # (try disabling this and comparing assembly, it's instructive) |
| 78 | CFLAGS += $(call cc-option,-fno-builtin-printf,) |
Bernhard Reutner-Fischer | 82f8788 | 2007-01-23 11:39:13 +0000 | [diff] [blame] | 79 | |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 80 | # clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs |
Biswapriyo Nath | 505eeae | 2020-06-09 23:05:12 +0530 | [diff] [blame] | 81 | ifeq ($(CC),clang) |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 82 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) |
Biswapriyo Nath | 505eeae | 2020-06-09 23:05:12 +0530 | [diff] [blame] | 83 | endif |
Denys Vlasenko | b4ef2e3 | 2019-10-25 12:56:51 +0200 | [diff] [blame] | 84 | |
Bernhard Reutner-Fischer | fdcd7c4 | 2007-01-22 17:50:21 +0000 | [diff] [blame] | 85 | # FIXME: These warnings are at least partially to be concerned about and should |
| 86 | # be fixed.. |
Bernhard Reutner-Fischer | e6ce824 | 2008-08-05 19:06:35 +0000 | [diff] [blame] | 87 | #CFLAGS += $(call cc-option,-Wconversion,) |
Bernhard Reutner-Fischer | 9729e65 | 2006-12-13 17:44:24 +0000 | [diff] [blame] | 88 | |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 89 | ifneq ($(CONFIG_DEBUG),y) |
Bernhard Reutner-Fischer | 7fbfb20 | 2022-04-24 18:36:10 +0200 | [diff] [blame] | 90 | CFLAGS += $(call cc-option,-Oz,$(call cc-option,-Os,$(call cc-option,-O2,))) |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 91 | else |
| 92 | CFLAGS += $(call cc-option,-g,) |
Bernhard Reutner-Fischer | e6ce824 | 2008-08-05 19:06:35 +0000 | [diff] [blame] | 93 | #CFLAGS += "-D_FORTIFY_SOURCE=2" |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 94 | ifeq ($(CONFIG_DEBUG_PESSIMIZE),y) |
| 95 | CFLAGS += $(call cc-option,-O0,) |
| 96 | else |
Bernhard Reutner-Fischer | 7fbfb20 | 2022-04-24 18:36:10 +0200 | [diff] [blame] | 97 | CFLAGS += $(call cc-option,-Oz,$(call cc-option,-Os,$(call cc-option,-O2,))) |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 98 | endif |
Bernhard Reutner-Fischer | 9729e65 | 2006-12-13 17:44:24 +0000 | [diff] [blame] | 99 | endif |
Mike Frysinger | 43e5663 | 2016-02-12 22:12:47 -0500 | [diff] [blame] | 100 | ifeq ($(CONFIG_DEBUG_SANITIZE),y) |
| 101 | CFLAGS += $(call cc-option,-fsanitize=address,) |
| 102 | CFLAGS += $(call cc-option,-fsanitize=leak,) |
| 103 | CFLAGS += $(call cc-option,-fsanitize=undefined,) |
| 104 | endif |
Bernhard Reutner-Fischer | 9729e65 | 2006-12-13 17:44:24 +0000 | [diff] [blame] | 105 | |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 106 | # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... |
| 107 | ARCH_FPIC ?= -fpic |
| 108 | ARCH_FPIE ?= -fpie |
| 109 | ARCH_PIE ?= -pie |
| 110 | |
Mike Frysinger | 5694afd | 2012-10-20 15:01:26 -0400 | [diff] [blame] | 111 | # Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES)) |
| 112 | define pkg_check_modules |
| 113 | $(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2)) |
| 114 | $(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2)) |
| 115 | endef |
| 116 | |
Denis Vlasenko | 9b49a5e | 2007-10-11 10:05:36 +0000 | [diff] [blame] | 117 | ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y) |
Denis Vlasenko | 8d82cf7 | 2007-10-11 10:02:52 +0000 | [diff] [blame] | 118 | # on i386: 14% smaller libbusybox.so |
| 119 | # (code itself is 9% bigger, we save on relocs/PLT/GOT) |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 120 | CFLAGS += $(ARCH_FPIC) |
Denis Vlasenko | 9b49a5e | 2007-10-11 10:05:36 +0000 | [diff] [blame] | 121 | # and another 4% reduction of libbusybox.so: |
| 122 | # (external entry points must be marked EXTERNALLY_VISIBLE) |
| 123 | CFLAGS += $(call cc-option,-fvisibility=hidden) |
Denis Vlasenko | 8d82cf7 | 2007-10-11 10:02:52 +0000 | [diff] [blame] | 124 | endif |
| 125 | |
Bernhard Reutner-Fischer | c1feac6 | 2007-01-08 16:29:15 +0000 | [diff] [blame] | 126 | ifeq ($(CONFIG_STATIC),y) |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 127 | CFLAGS_busybox += -static |
Mike Frysinger | 5694afd | 2012-10-20 15:01:26 -0400 | [diff] [blame] | 128 | PKG_CONFIG_FLAGS += --static |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 129 | endif |
| 130 | |
| 131 | ifeq ($(CONFIG_PIE),y) |
| 132 | CFLAGS_busybox += $(ARCH_PIE) |
| 133 | CFLAGS += $(ARCH_FPIE) |
Bernhard Reutner-Fischer | c1feac6 | 2007-01-08 16:29:15 +0000 | [diff] [blame] | 134 | endif |
Denis Vlasenko | d46d3c2 | 2007-02-06 19:28:50 +0000 | [diff] [blame] | 135 | |
Bernhard Reutner-Fischer | f6107c7 | 2009-01-22 13:27:14 +0000 | [diff] [blame] | 136 | ifneq ($(CONFIG_EXTRA_CFLAGS),) |
| 137 | CFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_CFLAGS))) |
| 138 | #")) |
| 139 | endif |
| 140 | |
Denys Vlasenko | 39c2cb2 | 2012-03-08 00:20:01 +0100 | [diff] [blame] | 141 | # Note: both "" (string consisting of two quote chars) and empty string |
| 142 | # are possible, and should be skipped below. |
| 143 | ifneq ($(subst "",,$(CONFIG_SYSROOT)),) |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 144 | CFLAGS += --sysroot=$(CONFIG_SYSROOT) |
| 145 | export SYSROOT=$(CONFIG_SYSROOT) |
| 146 | endif |
| 147 | |
Denys Vlasenko | eb1b290 | 2021-04-14 19:01:53 +0200 | [diff] [blame] | 148 | # libm may be needed for dc, awk, ntpd |
| 149 | LDLIBS += m |
Denys Vlasenko | c528917 | 2012-03-10 16:30:00 +0100 | [diff] [blame] | 150 | # Android has no separate crypt library |
Denys Vlasenko | 6dca172 | 2012-04-20 18:24:09 +0200 | [diff] [blame] | 151 | # gcc-4.2.1 fails if we try to feed C source on stdin: |
| 152 | # echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc - |
| 153 | # fall back to using a temp file: |
Martin Kaiser | 9b67880 | 2021-11-08 17:36:43 +0100 | [diff] [blame] | 154 | CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >bb_libtest.c; $(CC) $(CFLAGS) $(CFLAGS_busybox) -lcrypt -o /dev/null bb_libtest.c >/dev/null 2>&1 && echo "y"; rm bb_libtest.c) |
| 155 | RT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >bb_libtest.c; $(CC) $(CFLAGS) $(CFLAGS_busybox) -lrt -o /dev/null bb_libtest.c >/dev/null 2>&1 && echo "y"; rm bb_libtest.c) |
Denys Vlasenko | c528917 | 2012-03-10 16:30:00 +0100 | [diff] [blame] | 156 | ifeq ($(CRYPT_AVAILABLE),y) |
Denys Vlasenko | eb1b290 | 2021-04-14 19:01:53 +0200 | [diff] [blame] | 157 | LDLIBS += crypt |
Denys Vlasenko | c528917 | 2012-03-10 16:30:00 +0100 | [diff] [blame] | 158 | endif |
Denys Vlasenko | be5a505 | 2019-10-24 16:26:55 +0200 | [diff] [blame] | 159 | # librt may be needed for clock_gettime() |
Denys Vlasenko | eb1b290 | 2021-04-14 19:01:53 +0200 | [diff] [blame] | 160 | ifeq ($(RT_AVAILABLE),y) |
| 161 | LDLIBS += rt |
| 162 | endif |
Denys Vlasenko | c528917 | 2012-03-10 16:30:00 +0100 | [diff] [blame] | 163 | |
Denys Vlasenko | c8e5ead | 2015-10-12 03:12:17 +0200 | [diff] [blame] | 164 | # libpam may use libpthread, libdl and/or libaudit. |
| 165 | # On some platforms that requires an explicit -lpthread, -ldl, -laudit. |
| 166 | # However, on *other platforms* it fails when some of those flags |
| 167 | # given needlessly. On some systems, crypt needs pthread. |
| 168 | # |
| 169 | # I even had a system where a runtime test for pthread |
| 170 | # (similar to CRYPT_AVAILABLE test above) was not reliable. |
| 171 | # |
| 172 | # Do not propagate this mess by adding libraries to CONFIG_PAM/CRYPT_AVAILABLE blocks. |
| 173 | # Add libraries you need to CONFIG_EXTRA_LDLIBS instead. |
Denys Vlasenko | 2156e22 | 2015-09-04 04:20:51 +0200 | [diff] [blame] | 174 | |
Denis Vlasenko | d6e81c7 | 2007-08-21 10:58:18 +0000 | [diff] [blame] | 175 | ifeq ($(CONFIG_PAM),y) |
Denys Vlasenko | c8e5ead | 2015-10-12 03:12:17 +0200 | [diff] [blame] | 176 | LDLIBS += pam pam_misc |
Denis Vlasenko | d6e81c7 | 2007-08-21 10:58:18 +0000 | [diff] [blame] | 177 | endif |
| 178 | |
Denis Vlasenko | d46d3c2 | 2007-02-06 19:28:50 +0000 | [diff] [blame] | 179 | ifeq ($(CONFIG_SELINUX),y) |
Mike Frysinger | 5694afd | 2012-10-20 15:01:26 -0400 | [diff] [blame] | 180 | SELINUX_PC_MODULES = libselinux libsepol |
| 181 | $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) |
| 182 | CPPFLAGS += $(SELINUX_CFLAGS) |
| 183 | LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) |
Denis Vlasenko | d46d3c2 | 2007-02-06 19:28:50 +0000 | [diff] [blame] | 184 | endif |
Bernhard Reutner-Fischer | 58a275b | 2007-03-28 15:00:27 +0000 | [diff] [blame] | 185 | |
Denys Vlasenko | fa87abe | 2018-04-16 11:04:03 +0200 | [diff] [blame] | 186 | ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) |
Denys Vlasenko | 8ed57db | 2023-01-02 17:10:04 +0100 | [diff] [blame] | 187 | ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) |
| 188 | LDLIBS += resolv |
| 189 | endif |
Samuel Thibault | 77216c3 | 2022-10-16 02:04:59 +0200 | [diff] [blame] | 190 | ifneq (,$(findstring gnu,$(shell $(CC) $(CFLAGS) -dumpmachine))) |
Denys Vlasenko | fa87abe | 2018-04-16 11:04:03 +0200 | [diff] [blame] | 191 | LDLIBS += resolv |
| 192 | endif |
Alex Samorukov | 0544933 | 2021-01-04 01:22:24 +0100 | [diff] [blame] | 193 | endif |
Denys Vlasenko | fa87abe | 2018-04-16 11:04:03 +0200 | [diff] [blame] | 194 | |
Bernhard Reutner-Fischer | 58a275b | 2007-03-28 15:00:27 +0000 | [diff] [blame] | 195 | ifeq ($(CONFIG_EFENCE),y) |
Denis Vlasenko | 76a6b23 | 2007-10-07 17:05:42 +0000 | [diff] [blame] | 196 | LDLIBS += efence |
Bernhard Reutner-Fischer | 58a275b | 2007-03-28 15:00:27 +0000 | [diff] [blame] | 197 | endif |
| 198 | |
| 199 | ifeq ($(CONFIG_DMALLOC),y) |
Denis Vlasenko | 76a6b23 | 2007-10-07 17:05:42 +0000 | [diff] [blame] | 200 | LDLIBS += dmalloc |
Bernhard Reutner-Fischer | 58a275b | 2007-03-28 15:00:27 +0000 | [diff] [blame] | 201 | endif |
| 202 | |
Mike Frysinger | dec37b3 | 2009-03-12 07:56:49 +0000 | [diff] [blame] | 203 | # If a flat binary should be built, CFLAGS_busybox="-elf2flt" |
Denis Vlasenko | 401de64 | 2008-06-06 16:11:12 +0000 | [diff] [blame] | 204 | # env var should be set for make invocation. |
| 205 | # Here we check whether CFLAGS_busybox indeed contains that flag. |
| 206 | # (For historical reasons, we also check LDFLAGS, which doesn't |
Mike Frysinger | dec37b3 | 2009-03-12 07:56:49 +0000 | [diff] [blame] | 207 | # seem to be entirely correct variable to put "-elf2flt" into). |
| 208 | W_ELF2FLT = -elf2flt |
Denis Vlasenko | 401de64 | 2008-06-06 16:11:12 +0000 | [diff] [blame] | 209 | ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox))) |
Mike Frysinger | 5b5bcf2 | 2007-06-19 15:58:02 +0000 | [diff] [blame] | 210 | SKIP_STRIP = y |
| 211 | endif |
| 212 | |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 213 | ifneq ($(CONFIG_EXTRA_LDFLAGS),) |
Denys Vlasenko | e0ddb65 | 2015-04-14 14:15:15 +0200 | [diff] [blame] | 214 | LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS))) |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 215 | #")) |
| 216 | endif |
| 217 | |
Mike Frysinger | c7b10dc | 2007-04-05 21:10:59 +0000 | [diff] [blame] | 218 | # Busybox is a stack-fatty so make sure we increase default size |
Denis Vlasenko | 931de89 | 2007-06-21 12:43:45 +0000 | [diff] [blame] | 219 | # TODO: use "make stksizes" to find & fix big stack users |
| 220 | # (we stole scripts/checkstack.pl from the kernel... thanks guys!) |
Denis Vlasenko | fcfb5c0 | 2007-12-24 12:16:24 +0000 | [diff] [blame] | 221 | # Reduced from 20k to 16k in 1.9.0. |
| 222 | FLTFLAGS += -s 16000 |