From: blogic Date: Mon, 1 Sep 2014 13:21:36 +0000 (+0000) Subject: busybox: Fix pam_start link errors when PAM support is enabled X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=9558acae1a764cded86cbfbef2882ef7c898c019;hp=96b714042b76015cddde593027e5fc5332358ffd;p=openwrt-14.07%2F.git 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 Backport of r42195 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@42368 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 3380885..668679e 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 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)" \