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 From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 18:00:24 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 8ED341065752 for ; Thu, 11 Dec 2008 18:00:24 +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 342218FC18 for ; Thu, 11 Dec 2008 18:00:24 +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 mBBHvtDa039855; Thu, 11 Dec 2008 10:57:55 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 11 Dec 2008 10:58:08 -0700 (MST) Message-Id: <20081211.105808.-1186640207.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <20081211.100636.631212415.imp@bsdimp.com> References: <200812110822.mBB8MKLd059320@svn.freebsd.org> <86oczjklk8.fsf@ds4.des.no> <20081211.100636.631212415.imp@bsdimp.com> 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 18:00:24 -0000 In message: <20081211.100636.631212415.imp@bsdimp.com> "M. Warner Losh" writes: : 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= in : : libpam, while building the static version, which includes all modul= es: : = : 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 funct= ion `pam_sm_open_session': : : /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple definition= of `pam_sm_open_session' : : ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/sr= c/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 dete= rmine : : whether it is building static or shared modules is as follows: : : : : #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MO= DULES) : = : I think the problem here is a confusion between 'static vs dynamic' a= nd : '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. Ooops, looks like I neglected to add the following: The reason that it always produces 'x' has to do with the MIPS calling conventions. Everything is always compiled PIC. There's a way to disable this for the kernel, -mnoabicalls, but in userland that's what all the tool chains expect. There may be other issues. I have a fuzzy memory of some, but I can't recall any and explain them in a way that makes sense, so I'll leave it at that. So if you are compiling for a static library or a dynamic library doesn't matter: __PIC__ is effectively always defined. Any suggestions on how to handle this problem? Warner From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 20:04:09 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 8F4581065693 for ; Thu, 11 Dec 2008 20:04:09 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout011.mac.com (asmtpout011.mac.com [17.148.16.86]) by mx1.freebsd.org (Postfix) with ESMTP id 7B32B8FC13 for ; Thu, 11 Dec 2008 20:04:09 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Received: from vupadhyaya-t43.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp011.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KBQ00G0J7M9DT40@asmtp011.mac.com> for freebsd-mips@freebsd.org; Thu, 11 Dec 2008 11:03:46 -0800 (PST) Message-id: From: Marcel Moolenaar To: "M. Warner Losh" In-reply-to: <20081211.105808.-1186640207.imp@bsdimp.com> Content-transfer-encoding: quoted-printable Date: Thu, 11 Dec 2008 11:03:45 -0800 References: <200812110822.mBB8MKLd059320@svn.freebsd.org> <86oczjklk8.fsf@ds4.des.no> <20081211.100636.631212415.imp@bsdimp.com> <20081211.105808.-1186640207.imp@bsdimp.com> X-Mailer: Apple Mail (2.929.2) Cc: des@des.no, 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 20:04:09 -0000 On Dec 11, 2008, at 9:58 AM, M. Warner Losh wrote: > In message: <20081211.100636.631212415.imp@bsdimp.com> > "M. Warner Losh" writes: > : 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 =20 > breaks in > : : libpam, while building the static version, which includes all =20 > 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 =20 > function `pam_sm_open_session': > : : /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple =20 > definition of `pam_sm_open_session' > : : ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/=20= > 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 =20 > determine > : : whether it is building static or shared modules is as follows: > : : > : : #if defined(__GNUC__) && !defined(__PIC__) && !=20 > defined(NO_STATIC_MODULES) > : > : I think the problem here is a confusion between 'static vs =20 > 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. > > Ooops, looks like I neglected to add the following: > > The reason that it always produces 'x' has to do with the MIPS calling > conventions. Everything is always compiled PIC. There's a way to > disable this for the kernel, -mnoabicalls, but in userland that's what > all the tool chains expect. There may be other issues. I have a > fuzzy memory of some, but I can't recall any and explain them in a way > that makes sense, so I'll leave it at that. So if you are compiling > for a static library or a dynamic library doesn't matter: __PIC__ is > effectively always defined. > > Any suggestions on how to handle this problem? What about using OPENPAM_STATIC_MODULES for it? It's now defined in openpam.h as a consequence of the faulty logic. We might as well make it the pivotal flag... --=20 Marcel Moolenaar xcllnt@mac.com From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 20:09:19 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 A2EF41065678 for ; Thu, 11 Dec 2008 20:09:19 +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 7469B8FC1A for ; Thu, 11 Dec 2008 20:09:17 +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 mBBK8HGm041287; Thu, 11 Dec 2008 13:08:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 11 Dec 2008 13:08:30 -0700 (MST) Message-Id: <20081211.130830.1365011002.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <20081211.100636.631212415.imp@bsdimp.com> <20081211.105808.-1186640207.imp@bsdimp.com> 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: des@des.no, 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 20:09:19 -0000 In message: Marcel Moolenaar writes: : = : On Dec 11, 2008, at 9:58 AM, M. Warner Losh wrote: : = : > In message: <20081211.100636.631212415.imp@bsdimp.com> : > "M. Warner Losh" writes: : > : 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 in : > : : 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 = : > function `pam_sm_open_session': : > : : /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple = : > definition of `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 he= re : > : : [lather, rinse, repeat for every service function in every modu= le] : > : : : > : : The service functions should be static. The logic PAM uses to = = : > determine : > : : whether it is building static or shared modules is as follows: : > : : : > : : #if defined(__GNUC__) && !defined(__PIC__) && ! = : > defined(NO_STATIC_MODULES) : > : : > : 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 h= ad : > : got on looking into the problem. : > : > Ooops, looks like I neglected to add the following: : > : > The reason that it always produces 'x' has to do with the MIPS call= ing : > conventions. Everything is always compiled PIC. There's a way to : > disable this for the kernel, -mnoabicalls, but in userland that's w= hat : > all the tool chains expect. There may be other issues. I have a : > fuzzy memory of some, but I can't recall any and explain them in a = way : > that makes sense, so I'll leave it at that. So if you are compilin= g : > for a static library or a dynamic library doesn't matter: __PIC__ i= s : > effectively always defined. : > : > Any suggestions on how to handle this problem? : = : What about using OPENPAM_STATIC_MODULES for it? : It's now defined in openpam.h as a consequence of : the faulty logic. We might as well make it the : pivotal flag... I'm not sure i follow your suggestion... Warner From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 20:24:03 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 453CF106567B for ; Thu, 11 Dec 2008 20:24:03 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout012.mac.com (asmtpout012.mac.com [17.148.16.87]) by mx1.freebsd.org (Postfix) with ESMTP id 3037A8FC0C for ; Thu, 11 Dec 2008 20:24:03 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Received: from lynx.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KBQ00JAGBC11TA0@asmtp012.mac.com> for freebsd-mips@freebsd.org; Thu, 11 Dec 2008 12:24:02 -0800 (PST) Message-id: From: Marcel Moolenaar To: "M. Warner Losh" In-reply-to: <20081211.130830.1365011002.imp@bsdimp.com> Content-transfer-encoding: quoted-printable Date: Thu, 11 Dec 2008 12:23:57 -0800 References: <20081211.100636.631212415.imp@bsdimp.com> <20081211.105808.-1186640207.imp@bsdimp.com> <20081211.130830.1365011002.imp@bsdimp.com> X-Mailer: Apple Mail (2.929.2) Cc: des@des.no, 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 20:24:03 -0000 On Dec 11, 2008, at 12:08 PM, M. Warner Losh wrote: > In message: > Marcel Moolenaar writes: > : > : On Dec 11, 2008, at 9:58 AM, M. Warner Losh wrote: > : > : > In message: <20081211.100636.631212415.imp@bsdimp.com> > : > "M. Warner Losh" writes: > : > : 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 in > : > : : 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, =20= > but I > : > : think the latter. Let me explain. > : > : > : > : : ../modules/pam_deny/libpam_deny.a(pam_deny.o)(.text+0x3c): In > : > function `pam_sm_open_session': > : > : : /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple > : > definition of `pam_sm_open_session' > : > : : ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text=20 > +0x14):/ > : > src/lib/libpam/modules/pam_chroot/pam_chroot.c:54: first defined =20= > here > : > : : [lather, rinse, repeat for every service function in every =20 > module] > : > : : > : > : : The service functions should be static. The logic PAM uses to > : > determine > : > : : whether it is building static or shared modules is as follows: > : > : : > : > : : #if defined(__GNUC__) && !defined(__PIC__) && ! > : > defined(NO_STATIC_MODULES) > : > : > : > : 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 =20= > I had > : > : got on looking into the problem. > : > > : > Ooops, looks like I neglected to add the following: > : > > : > The reason that it always produces 'x' has to do with the MIPS =20 > calling > : > conventions. Everything is always compiled PIC. There's a way to > : > disable this for the kernel, -mnoabicalls, but in userland =20 > that's what > : > all the tool chains expect. There may be other issues. I have a > : > fuzzy memory of some, but I can't recall any and explain them in =20= > a way > : > that makes sense, so I'll leave it at that. So if you are =20 > compiling > : > for a static library or a dynamic library doesn't matter: =20 > __PIC__ is > : > effectively always defined. > : > > : > Any suggestions on how to handle this problem? > : > : What about using OPENPAM_STATIC_MODULES for it? > : It's now defined in openpam.h as a consequence of > : the faulty logic. We might as well make it the > : pivotal flag... > > I'm not sure i follow your suggestion... Sorry, I was a bit cryptic. Currently openpam.h does something like: #if defined(__GNUC__) && !defined(__PIC__) && !=20 defined(NO_STATIC_MODULES) #define OPENPAM_STATIC_MODULES 1 ... foo ... #else ... bar ... #endif Why not make OPENPAM_STATIC_MODULES a define that you put on the compiler command line and change the code to: #ifdef OPENPAM_STATIC_MODULES ... foo ... #else ... bar ... #endif It should be fairly easy for us to add it only when needed, given that we have different rules for building static vs shared libraries... --=20 Marcel Moolenaar xcllnt@mac.com From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 21:39:56 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 F0A4F1065678 for ; Thu, 11 Dec 2008 21:39:56 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id AD3068FC13 for ; Thu, 11 Dec 2008 21:39:56 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6BA126D44E; Thu, 11 Dec 2008 21:24:41 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 49E4B844BA; Thu, 11 Dec 2008 22:24:41 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Marcel Moolenaar References: <20081211.100636.631212415.imp@bsdimp.com> <20081211.105808.-1186640207.imp@bsdimp.com> <20081211.130830.1365011002.imp@bsdimp.com> Date: Thu, 11 Dec 2008 22:24:41 +0100 In-Reply-To: (Marcel Moolenaar's message of "Thu, 11 Dec 2008 12:23:57 -0800") Message-ID: <86hc5as8va.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 21:39:57 -0000 Marcel Moolenaar writes: > Why not make OPENPAM_STATIC_MODULES a define that you put > on the compiler command line and change the code to: > > #ifdef OPENPAM_STATIC_MODULES > ... foo ... > #else > ... bar ... > #endif My preference would be to remove support for statically linked modules altogether, but some people might object... This is probably the best compromise. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-mips@FreeBSD.ORG Thu Dec 11 22:12:41 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 C5A3F1065673 for ; Thu, 11 Dec 2008 22:12:41 +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 875108FC23 for ; Thu, 11 Dec 2008 22:12:41 +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 mBBMAc2i042775; Thu, 11 Dec 2008 15:10:38 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 11 Dec 2008 15:10:51 -0700 (MST) Message-Id: <20081211.151051.-1112729558.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86hc5as8va.fsf@ds4.des.no> References: <20081211.130830.1365011002.imp@bsdimp.com> <86hc5as8va.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 22:12:41 -0000 In message: <86hc5as8va.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : Marcel Moolenaar writes: : > Why not make OPENPAM_STATIC_MODULES a define that you put : > on the compiler command line and change the code to: : > : > #ifdef OPENPAM_STATIC_MODULES : > ... foo ... : > #else : > ... bar ... : > #endif : = : My preference would be to remove support for statically linked module= s : altogether, but some people might object... This is probably the bes= t : compromise. We could just not support it on MIPS as well... I have patches in my tree that do this in an uglyass way and was hoping for a better solution... Warner From owner-freebsd-mips@FreeBSD.ORG Sat Dec 13 21:30:02 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 023C2106567C; Sat, 13 Dec 2008 21:30:02 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id C6E8C8FC13; Sat, 13 Dec 2008 21:30:01 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 202631E746E; Sat, 13 Dec 2008 16:30:01 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 13 Dec 2008 16:30:01 -0500 X-Sasl-enc: NL0LUr5C35L5o1ZodZaCJLlC27/JP24lgvtG50VIH44s 1229203800 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 7B13418818; Sat, 13 Dec 2008 16:30:00 -0500 (EST) Message-ID: <49442957.9030300@incunabulum.net> Date: Sat, 13 Dec 2008 21:29:59 +0000 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.18 (X11/20081205) MIME-Version: 1.0 To: "M. Warner Losh" References: <491EE062.2070705@incunabulum.net> <20081115.100002.-1384053695.imp@bsdimp.com> In-Reply-To: <20081115.100002.-1384053695.imp@bsdimp.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org, freebsd-mips@freebsd.org Subject: Re: MIPS port repository question 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: Sat, 13 Dec 2008 21:30:02 -0000 M. Warner Losh wrote: > Most of the mips stuff has been pushed into the tree. The bleeding > edge stuff is still just in p4. I didn't merge your bfe(4) changes > into svn, but if you have something that's stable, there's no reason > not to do so. OK, it's still in p4 branch mips2. I committed the change there which lets the PHY for bfe(4) attach on the Sentry5. The Sentry5 machine itself is now with gonzo@. cheers BMS From owner-freebsd-mips@FreeBSD.ORG Sat Dec 13 23:41:52 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 D5BFD1065675 for ; Sat, 13 Dec 2008 23:41:52 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 67C338FC12 for ; Sat, 13 Dec 2008 23:41:52 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2DB2A6D43F; Sat, 13 Dec 2008 23:41:51 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 174CB844CF; Sun, 14 Dec 2008 00:41:51 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Marcel Moolenaar References: <20081211.100636.631212415.imp@bsdimp.com> <20081211.105808.-1186640207.imp@bsdimp.com> <20081211.130830.1365011002.imp@bsdimp.com> Date: Sun, 14 Dec 2008 00:41:50 +0100 In-Reply-To: (Marcel Moolenaar's message of "Thu, 11 Dec 2008 12:23:57 -0800") Message-ID: <86myezve0x.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Sat, 13 Dec 2008 23:41:52 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marcel Moolenaar writes: > It should be fairly easy for us to add it only when needed, given that > we have different rules for building static vs shared libraries... Not quite. We have different rules, but they use the same CFLAGS. The "least intervention" to achieve what we want is to redefine the .c.o rule in lib/libpam/modules/Makefile.inc; see attached patch. A cleaner solution would be to modify share/mk/sys.mk and share/mk/bsd.lib.mk to add STATIC_CFLAGS and SHARED_CFLAGS variables, so we could simply set STATIC_CFLAGS=3D-DOPENPAM_STATIC_MODULES in Makefile.inc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=openpam_static_modules.diff Content-Transfer-Encoding: quoted-printable Property changes on: contrib/openpam ___________________________________________________________________ Modified: svn:mergeinfo Merged /vendor/openpam/dist:r186064-186066 Index: contrib/openpam/include/security/openpam.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/openpam/include/security/openpam.h (revision 186063) +++ contrib/openpam/include/security/openpam.h (working copy) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2007 Dag-Erling Sm=C3=B8rgrav + * Copyright (c) 2004-2008 Dag-Erling Sm=C3=B8rgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam.h 408 2007-12-21 11:36:24Z des $ + * $Id: openpam.h 418 2008-12-13 22:39:24Z des $ */ =20 #ifndef SECURITY_OPENPAM_H_INCLUDED @@ -309,18 +309,17 @@ * Infrastructure for static modules using GCC linker sets. * You are not expected to understand this. */ -#if defined(__FreeBSD__) +#if !defined(PAM_SOEXT) # define PAM_SOEXT ".so" -#else -# undef NO_STATIC_MODULES -# define NO_STATIC_MODULES #endif =20 -#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) +#if defined(OPENPAM_STATIC_MODULES) +# if !defined(__GNUC__) +# error "Don't know how to build static modules on non-GNU compilers" +# endif /* gcc, static linking */ # include # include -# define OPENPAM_STATIC_MODULES # define PAM_EXTERN static # define PAM_MODULE_ENTRY(name) \ static char _pam_name[] =3D name PAM_SOEXT; \ Index: lib/libpam/modules/Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libpam/modules/Makefile.inc (revision 186063) +++ lib/libpam/modules/Makefile.inc (working copy) @@ -19,4 +19,7 @@ LDADD+=3D -lpam .endif =20 +.c.o: + ${CC} ${CFLAGS} -DOPENPAM_STATIC_MODULES -c ${.IMPSRC} + .include "../Makefile.inc" --=-=-=--