From owner-freebsd-arch@FreeBSD.ORG Thu Aug 7 17:36:56 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F066106566C; Thu, 7 Aug 2008 17:36:56 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from luidgi.portaone.com (luidgi.portaone.com [195.138.219.143]) by mx1.freebsd.org (Postfix) with ESMTP id 5BCDE8FC26; Thu, 7 Aug 2008 17:36:56 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by luidgi.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1KR9Pz-000OFW-IU; Thu, 07 Aug 2008 10:36:55 -0700 Received: from jeeves.bluezbox.com (82.193.112.144.ipnet.kiev.ua [82.193.112.144]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m77HdpiM022795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Aug 2008 10:40:08 -0700 (PDT) (envelope-from gonzo@freebsd.org) Message-ID: <489B32A2.1090302@freebsd.org> Date: Thu, 07 Aug 2008 20:36:34 +0300 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.14 (X11/20080704) MIME-Version: 1.0 To: Oleksandr Tymoshenko References: <20080729.161303.709402272.imp@bsdimp.com> <86r69buar0.fsf@ds4.des.no> <489B08F6.8060605@freebsd.org> In-Reply-To: <489B08F6.8060605@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, recieved from trusted server Cc: kan@freebsd.org, =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , pjd@freebsd.org, arch@freebsd.org Subject: Re: Need a code review X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 17:36:56 -0000 Oleksandr Tymoshenko wrote: > Dag-Erling Smørgrav wrote: >> "M. Warner Losh" writes: >>> http://people.freebsd.org/~gonzo/mips2/libpam.diff >> >> This won't work. Your patch unconditionally sets NO_STATIC_MODULES >> which will result in a non-functional libpam.a (the modules will be >> built into the library, but without any of the glue that allows the >> library to find them) not just on mips, but on all other platforms. > > openpam detects static modules build using cpp(1) condition: > #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) > The problem is that gcc MIPS option -mabi-calls assumes -fpic for both > static and dynamic builds. So the question is: would defining > NO_STATIC_MODULES for MIPS be enough or it should be addressed > upstream? And diff in question is *completely* wrong. NO_STATIC_MODULES should be added to flags when compiling objects for shlib, not to PICFLAGS Actual "fix" passed unnoticed by me in contrib/openpam, sorry for misguiding. -- gonzo