Browse Source

sde-build-tools: flwrapper: use ldd to decide FLWRAPPER_LIBC [WIP]

Signed-off-by: Alejandro Mery <amery@geeks.cl>
user/amery/stage
Alejandro Mery 4 years ago
parent
commit
b01cc8dc46
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      lib/sde-build/flist_flwrapper_tools.in

+ 12
- 4
lib/sde-build/flist_flwrapper_tools.in

@ -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'

Loading…
Cancel
Save