aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-08-18 13:10:08 +0000
committerJohn Crispin <blogic@openwrt.org>2014-08-18 13:10:08 +0000
commit90b2348344817d1895789d654fdab306c1db69c7 (patch)
treec01a0247be538e6d0ff42ebf4a035c262bee8157 /package/utils
parent743beb18ffc3db90f33c2b9912822aa9120fab05 (diff)
downloadupstream-90b2348344817d1895789d654fdab306c1db69c7.tar.gz
upstream-90b2348344817d1895789d654fdab306c1db69c7.tar.bz2
upstream-90b2348344817d1895789d654fdab306c1db69c7.zip
busybox: Fix pam_start link errors when PAM support is enabled
Patch to BusyBox Makefile to fix linker errors when PAM support is enabled by CONFIG_BUSYBOX_CONFIG_PAM=y. Typical errors include: login.c:(.text.login_main+0x122): undefined reference to `pam_start' Signed-off-by: Stephen Parry <sgparry@mainscreen.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42195 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/busybox/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 3380885a1d..668679e4d2 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads \
http://distfiles.gentoo.org/distfiles/
PKG_MD5SUM:=337d1a15ab1cb1d4ed423168b1eb7d7e
-PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
+PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
PKG_BUILD_PARALLEL:=1
PKG_CHECK_FORMAT_SECURITY:=0
@@ -42,7 +42,7 @@ define Package/busybox
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
TITLE:=Core utilities for embedded Linux
URL:=http://busybox.net/
- DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc
+ DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam
MENU:=1
endef
@@ -80,6 +80,12 @@ ifdef CONFIG_BUSYBOX_USE_LIBRPC
LDLIBS += rpc
endif
+ifdef CONFIG_BUSYBOX_CONFIG_PAM
+ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+ export LDFLAGS=$(TARGET_LDFLAGS)
+ LDLIBS += pam pam_misc pthread
+endif
+
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \