aboutsummaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.flags')
-rw-r--r--Makefile.flags23
1 files changed, 15 insertions, 8 deletions
diff --git a/Makefile.flags b/Makefile.flags
index 58fcf33eb..c3ac5b458 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -57,6 +57,9 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
57# Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): 57# Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary):
58CFLAGS += $(call cc-option,-fno-unwind-tables,) 58CFLAGS += $(call cc-option,-fno-unwind-tables,)
59CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) 59CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
60# No automatic printf->puts,putchar conversions
61# (try disabling this and comparing assembly, it's instructive)
62CFLAGS += $(call cc-option,-fno-builtin-printf,)
60 63
61# FIXME: These warnings are at least partially to be concerned about and should 64# FIXME: These warnings are at least partially to be concerned about and should
62# be fixed.. 65# be fixed..
@@ -134,15 +137,19 @@ else
134LDLIBS += m 137LDLIBS += m
135endif 138endif
136 139
140# libpam may use libpthread, libdl and/or libaudit.
141# On some platforms that requires an explicit -lpthread, -ldl, -laudit.
142# However, on *other platforms* it fails when some of those flags
143# given needlessly. On some systems, crypt needs pthread.
144#
145# I even had a system where a runtime test for pthread
146# (similar to CRYPT_AVAILABLE test above) was not reliable.
147#
148# Do not propagate this mess by adding libraries to CONFIG_PAM/CRYPT_AVAILABLE blocks.
149# Add libraries you need to CONFIG_EXTRA_LDLIBS instead.
150
137ifeq ($(CONFIG_PAM),y) 151ifeq ($(CONFIG_PAM),y)
138# libpam uses libpthread, so for static builds busybox must be linked to 152LDLIBS += pam pam_misc
139# libpthread. On some platforms that requires an explicit -lpthread, so
140# it should be in LDLIBS. For non-static builds, scripts/trylink will
141# take care of removing -lpthread if possible. (Not bothering to check
142# CONFIG_STATIC because even in a non-static build it could be that the
143# only libpam available is libpam.a, so -lpthread could still be
144# needed.)
145LDLIBS += pam pam_misc pthread
146endif 153endif
147 154
148ifeq ($(CONFIG_SELINUX),y) 155ifeq ($(CONFIG_SELINUX),y)