From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 17:09:49 2008 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E001E106567A for ; Thu, 11 Dec 2008 17:09:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A05A38FC27 for ; Thu, 11 Dec 2008 17:09:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBBH6N4p039247; Thu, 11 Dec 2008 10:06:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 11 Dec 2008 10:06:36 -0700 (MST) Message-Id: <20081211.100636.631212415.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86oczjklk8.fsf@ds4.des.no> References: <200812110822.mBB8MKLd059320@svn.freebsd.org> <86oczjklk8.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@FreeBSD.org Subject: Re: svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 17:09:50 -0000 In message: <86oczjklk8.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : Warner Losh writes: : > Author: imp : > Date: Thu Dec 11 08:22:20 2008 : > New Revision: 185925 : > URL: http://svn.freebsd.org/changeset/base/185925 : > : > Log: : > Push mips support into the tree. : = : Just to pick a random mips commit - : = : There is something wrong with the mips toolchain. The build breaks i= n : libpam, while building the static version, which includes all modules= : Something is wrong either with the toolchain or with PAM's assumptions. I've not tracked it down further than that yet, but I think the latter. Let me explain. : ../modules/pam_deny/libpam_deny.a(pam_deny.o)(.text+0x3c): In functio= n `pam_sm_open_session': : /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple definition o= f `pam_sm_open_session' : ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/src/= lib/libpam/modules/pam_chroot/pam_chroot.c:54: first defined here : [lather, rinse, repeat for every service function in every module] : = : The service functions should be static. The logic PAM uses to determ= ine : whether it is building static or shared modules is as follows: : : #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODU= LES) I think the problem here is a confusion between 'static vs dynamic' and= 'pic vs nonpic'. #ifdef __PIC__ int x; #else int y; #endif produces a .o with the symbol 'x' always. That was as far as I had got on looking into the problem. Warner