aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Config.in8
-rw-r--r--Makefile.flags3
2 files changed, 10 insertions, 1 deletions
diff --git a/Config.in b/Config.in
index ac5b13b8d..a98a8b15b 100644
--- a/Config.in
+++ b/Config.in
@@ -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
532config 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
532comment 'Installation Options ("make install" behavior)' 540comment 'Installation Options ("make install" behavior)'
533 541
534choice 542choice
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
58CFLAGS += $(call cc-option,-fno-guess-branch-probability,) 58CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
59CFLAGS += $(call cc-option,-funsigned-char,) 59CFLAGS += $(call cc-option,-funsigned-char,)
60 60
61ifneq ($(CC),clang) 61ifeq ($(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'"
63CFLAGS += $(call cc-option,-static-libgcc,) 64CFLAGS += $(call cc-option,-static-libgcc,)
64endif 65endif