Fix link failure on some platforms when PAM is enabled
No binary (build failed)
—
(log yok)
| @@ -105,7 +105,14 @@ LDLIBS += m | |
| endif | |
| ifeq ($(CONFIG_PAM),y) | |
| - | LDLIBS += pam pam_misc |
| + | # libpam uses libpthread, so for static builds busybox must be linked to |
| + | # libpthread. On some platforms that requires an explicit -lpthread, so |
| + | # it should be in LDLIBS. For non-static builds, scripts/trylink will |
| + | # take care of removing -lpthread if possible. (Not bothering to check |
| + | # CONFIG_STATIC because even in a non-static build it could be that the |
| + | # only libpam available is libpam.a, so -lpthread could still be |
| + | # needed.) |
| + | LDLIBS += pam pam_misc pthread |
| endif | |
| ifeq ($(CONFIG_SELINUX),y) | |