svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams

M. Warner Losh imp at bsdimp.com
Thu Dec 11 09:09:50 PST 2008


In message: <86oczjklk8.fsf at ds4.des.no>
            Dag-Erling_Smørgrav <des at des.no> writes:
: Warner Losh <imp at FreeBSD.org> 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 here
: [lather, rinse, repeat for every service function in every 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 I had
got on looking into the problem.

Warner


More information about the freebsd-mips mailing list