|
|
@ -14,15 +14,23 @@ |
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
flist_find_libc_so() { |
|
|
|
# TODO: when is this criteria valid? |
|
|
|
# $SHELL's libc |
|
|
|
if ldd /proc/$$/exe | grep 'libc[.-]' | |
|
|
|
sed -e 's:.* \(/[^ ]\+\) .*:\1:' | head -n1; then |
|
|
|
return |
|
|
|
fi |
|
|
|
|
|
|
|
# TODO: scan "$xroot"/lib*/{*/,}libc[.-]* |
|
|
|
} |
|
|
|
|
|
|
|
flist_tools_clean() { |
|
|
|
rm -f "$TOOLSDIR/lib/fl_wrapper.so" |
|
|
|
} |
|
|
|
|
|
|
|
flist_tools_build() { |
|
|
|
FLWRAPPER_LIBC=$(ls -1 \ |
|
|
|
"$xroot"/lib*/{*/,}libc[.-]* 2> /dev/null | |
|
|
|
grep -v '\.a$' | grep '\.so' | |
|
|
|
sort -V | head -n1 ) |
|
|
|
FLWRAPPER_LIBC=$(flist_find_libc_so) |
|
|
|
|
|
|
|
if [ ! -f "$FLWRAPPER_LIBC" ]; then |
|
|
|
abort 'Unable to detect /lib/libc.* for flwrapper' |
|
|
|