On Sat, Mar 24, 2012 at 12:04:13PM +0100, Michael Olbrich wrote:
> On Mon, Mar 19, 2012 at 10:14:47PM +0100, Remy Bohmer wrote:
> >  #
> > +# out: 'lib' or 'lib64', derived from the ld-{linux,uClibc}.so.? from the 
> > compiler toolchain
> > +#
> > +ptxd_get_lib_dir() {
> > +    local dl lib_dir extra_cppflags extra_cflags
> > +    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
> > +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> > +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
> > +
> > +    dl="$(echo 'int main(void){return 0;}' | \
> > +   ${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o 
> > /dev/null -v - 2>&1 | \
> > +   sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
> > +    lib_dir="${dl%%/ld-*.so.*}"
> > +    echo "${lib_dir#/}"
> 
> this is /lib or /lib64 etc. right? The way you use it later, you should
> remove the leading '/'. Otherwise you'll get /usr//lib, and while that is
> valid as path, some scripts may not match it correctly.

Forget this. That's your last line. I forgot to copy it, when I played with
the code.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to