diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-16 21:53:05 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-16 21:53:05 +0100 |
commit | 39646dce329c1b88b1de8ef0c450813765fda202 (patch) | |
tree | 19941ae07e43f177ae667f84abe3fd19e0d8b64c | |
parent | eb0c2e218ca1b0d733157bc2a11f8621d4ed2409 (diff) | |
download | busybox-w32-39646dce329c1b88b1de8ef0c450813765fda202.tar.gz busybox-w32-39646dce329c1b88b1de8ef0c450813765fda202.tar.bz2 busybox-w32-39646dce329c1b88b1de8ef0c450813765fda202.zip |
build system: make -static-libgcc selectable in config
OpenWrt wants this off.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Config.in | 8 | ||||
-rw-r--r-- | Makefile.flags | 3 |
2 files changed, 10 insertions, 1 deletions
@@ -529,6 +529,14 @@ config STACK_OPTIMIZATION_386 | |||
529 | do not work with it (they use SSE instructions without | 529 | do not work with it (they use SSE instructions without |
530 | ensuring stack alignment). | 530 | ensuring stack alignment). |
531 | 531 | ||
532 | config STATIC_LIBGCC | ||
533 | bool "Use -static-libgcc" | ||
534 | default y | ||
535 | help | ||
536 | This option instructs gcc to link in a static version of its | ||
537 | support library, libgcc. This means that the binary will require | ||
538 | one fewer dynamic library at run time. | ||
539 | |||
532 | comment 'Installation Options ("make install" behavior)' | 540 | comment 'Installation Options ("make install" behavior)' |
533 | 541 | ||
534 | choice | 542 | choice |
diff --git a/Makefile.flags b/Makefile.flags index cff935ff5..6ff4d7239 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -58,7 +58,8 @@ CFLAGS += $(call cc-option,-fno-builtin-strlen -fomit-frame-pointer -ffunction-s | |||
58 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) | 58 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) |
59 | CFLAGS += $(call cc-option,-funsigned-char,) | 59 | CFLAGS += $(call cc-option,-funsigned-char,) |
60 | 60 | ||
61 | ifneq ($(CC),clang) | 61 | ifeq ($(CONFIG_STATIC_LIBGCC),y) |
62 | # Disable it, for example, if you get | ||
62 | # "clang-9: warning: argument unused during compilation: '-static-libgcc'" | 63 | # "clang-9: warning: argument unused during compilation: '-static-libgcc'" |
63 | CFLAGS += $(call cc-option,-static-libgcc,) | 64 | CFLAGS += $(call cc-option,-static-libgcc,) |
64 | endif | 65 | endif |