diff options
| -rw-r--r-- | helper/binutil.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helper/binutil.inc b/helper/binutil.inc index e6c43559..b34230de 100644 --- a/helper/binutil.inc +++ b/helper/binutil.inc @@ -17,6 +17,8 @@ BLACKLIST="ld-linux linux-gate linux-vdso libc.so" LOCALSEARCH=0 LOCALSEARCHDIR="" +CURRENT_BLACKLIST=$(echo ${BLACKLIST} | sed 's/ /\\|/g') + get_dynamic_dependencies() { if [ "x$1" == "x-l" ]; then @@ -38,7 +40,7 @@ get_dynamic_dependencies() { local LDD_OUT="ldd_output" if ldd $BINARY > $LDD_OUT; then # Case 1: dynamic - for LIB in $(cat $LDD_OUT | grep -v $(echo $BLACKLIST|sed 's/ /\\|/g') | awk '{print $1 $2 $3}'); do + for LIB in $(cat $LDD_OUT | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do # split the entry into an array, ex: # libm.so.6 => /lib/libm.so.6 would be split into: # liblink[0] liblink[1] @@ -53,6 +55,7 @@ get_dynamic_dependencies() { fi rm -f $LDD_OUT done + } lib_search(){ @@ -68,6 +71,7 @@ lib_search(){ pdebug "\t\tFound locally, copying ${LOCALSEARCHDIR}/${llib}" get_link_chain "${LOCALSEARCHDIR}"/"${llib}" "${LOCALSEARCHDIR}" get_dynamic_dependencies -l "${LOCALSEARCHDIR}" "${llib}" + CURRENT_BLACKLIST+="\|${liblink[0]}" done # found the libs, we are done return @@ -80,6 +84,7 @@ lib_search(){ pdebug "\t\tNot found locally but in system, copying ${liblink[1]}" # get chain of symlink for that lib get_link_chain ${liblink[1]} + CURRENT_BLACKLIST+="\|${liblink[1]}" else pwarning "\t\tLib '${liblink[0]}' from required dir '$ENTRY' neither found in build directory nor on this system." pwarning "\t\tIf this lib is not supplied by another module, this module will probably fail in your final system" |
