diff options
| -rw-r--r-- | Makefile.flags | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.flags b/Makefile.flags index 7e1c6030c..ee4c518d8 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
| @@ -105,7 +105,14 @@ LDLIBS += m | |||
| 105 | endif | 105 | endif |
| 106 | 106 | ||
| 107 | ifeq ($(CONFIG_PAM),y) | 107 | ifeq ($(CONFIG_PAM),y) |
| 108 | LDLIBS += pam pam_misc | 108 | # libpam uses libpthread, so for static builds busybox must be linked to |
| 109 | # libpthread. On some platforms that requires an explicit -lpthread, so | ||
| 110 | # it should be in LDLIBS. For non-static builds, scripts/trylink will | ||
| 111 | # take care of removing -lpthread if possible. (Not bothering to check | ||
| 112 | # CONFIG_STATIC because even in a non-static build it could be that the | ||
| 113 | # only libpam available is libpam.a, so -lpthread could still be | ||
| 114 | # needed.) | ||
| 115 | LDLIBS += pam pam_misc pthread | ||
| 109 | endif | 116 | endif |
| 110 | 117 | ||
| 111 | ifeq ($(CONFIG_SELINUX),y) | 118 | ifeq ($(CONFIG_SELINUX),y) |
