rsb(rtems-build-dep): handle multiple library paths
Summary
The script rtems-build-dep
might fail to find a library if multiple -L path
arguments are passed.
The argument parser only keeps the last library path provided:
# source-builder/sb/rtems-build-dep
libraries="$2"; shift;
shift;;
Take the following example. We are trying to find libpython3.so
, which can be found on /usr/lib:
$ rtems-build-dep -c gcc -L /usr/lib -l libpython3.so # this works because we only pass -L once
> found
$ rtems-build-dep -c gcc -L /tmp/ -L /usr/lib -l libpython3.so # this also works because /usr/lib is the last path provided
> found
$ rtems-build-dep -c gcc -L /usr/lib -L /tmp/ -l libpython3.so # this fails because /usr/lib is discarded
> not-found
I've made a change to handle multiple library paths in the same fashion multiple include directories are handled.
--
I don't know the implications of this change. So far, I've managed to build the 6/rtems-arm
bset successfully using this changes.
Edited by Agustin Catellani