[MPlayer-dev-eng] [PATCH] FreeBSD DVD Fix

jb13 at gomerbud.com jb13 at gomerbud.com
Fri Aug 20 00:28:46 CEST 2004


On Thu, Aug 19, 2004 at 06:34:19PM +0200, Diego Biurrun wrote:
> jb13 at gomerbud.com writes:
> > On Wed, Aug 11, 2004 at 10:27:59AM +0200, Diego Biurrun wrote:
> > > 
> > > All of these patches need some explanation IMHO, so NetBSD people,
> > > please stand up.
> > 
> > --- configure.orig      2004-07-15 00:04:42.000000000 +0200
> > +++ configure
> > @@ -380,8 +380,8 @@ for ac_option do
> >      _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
> >      ;;
> >   --with-extralibdir=*)
> > -    _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > -#    _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's
> > ,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > +#    _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > +    _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,
> > :, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > 
> > this is for proper linking on netbsd, for an explanation why see
> > 
> > http://www.NetBSD.org/Documentation/elf.html
> 
> OK, it seems like the commented out version comes from a NetBSD
> portability patch.  A real portable solution would have to choose
> intelligently between the two at runtime, though.

you can't, the -rpath,-R options embed the libraries paths in the elf binary,
it has to be done at link time. note that it will probly work on all elf
systems linux,freebsd,openbsd etc. you could make something at the end of
configure like this

if netbsd ; then
  for i in LDFLAGS; do
    LDFLAGS=`echo LDFLAGS | sed 's,-L\(.* \),-L\1 -W\,-R\1,g'`
  done
fi

not tested

> > -  pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | 
> > head -1`
> > +  pfamily=`$_cpuinfo | grep -i 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2
> >  | head -1`
> > 
> > from grep(1)
> >   -i, --ignore-case
> >      Ignore case distinctions in  both  the  PATTERN  and  the  input files.
> 
> Sure, but why is that needed?

i don't know, maybe netbsd uses pentium insted of Pentium

jb13




More information about the MPlayer-dev-eng mailing list