From owner-svn-src-all@FreeBSD.ORG Sat Oct 22 14:08:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A777106564A; Sat, 22 Oct 2011 14:08:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39DD48FC13; Sat, 22 Oct 2011 14:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ME8MN2082517; Sat, 22 Oct 2011 14:08:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ME8MI2082515; Sat, 22 Oct 2011 14:08:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110221408.p9ME8MI2082515@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 22 Oct 2011 14:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226632 - head/lib/libpam/libpam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 14:08:22 -0000 Author: des Date: Sat Oct 22 14:08:21 2011 New Revision: 226632 URL: http://svn.freebsd.org/changeset/base/226632 Log: Revert the previous commit and add a comment explaining why it was wrong. Modified: head/lib/libpam/libpam/Makefile Modified: head/lib/libpam/libpam/Makefile ============================================================================== --- head/lib/libpam/libpam/Makefile Sat Oct 22 11:42:48 2011 (r226631) +++ head/lib/libpam/libpam/Makefile Sat Oct 22 14:08:21 2011 (r226632) @@ -55,7 +55,6 @@ SRCS= openpam_borrow_cred.c \ openpam_readline.c \ openpam_restore_cred.c \ openpam_set_option.c \ - openpam_static.c \ openpam_ttyconv.c \ pam_acct_mgmt.c \ pam_authenticate.c \ @@ -149,16 +148,29 @@ HEADERS= security/openpam.h \ ADD_HEADERS= security/pam_mod_misc.h +# # Static modules +# +# We build static versions of all modules and of openpam_static.o, +# then link them all together into openpam_static_modules.o. None of +# the modules export any symbols, but they store structures with +# pointers to their service functions in a linker set which the code +# in openpam_static.c traverses to locate the individual modules. +# MODULE_DIR= ../modules .include "${.CURDIR}/${MODULE_DIR}/modules.inc" STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/} STATICOBJS+= openpam_static_modules.o -CLEANFILES+= openpam_static_modules.o +CLEANFILES+= openpam_static.o \ + openpam_static_modules.o openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} +# We can't put openpam_static.c in SRCS, but we still want to scan it +# for dependencies. +DPSRCS= openpam_static.c + # Headers INCS= ${HEADERS} ${ADD_HEADERS} INCSDIR= ${INCLUDEDIR}/security