From 31dd323c81d996097eb31ab418eab1647701e349 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 18 Apr 2016 00:55:28 -0400 Subject: [PATCH] termux-tools: More robust check for 64-bit runtime Previously the wrapper scripts for binaries in /system/bin used /system/bin/getprop to determine if /system/lib or /system/lib64 should be used for the LD_LIBRARY_PATH. We now switch to checking for /system/bin/linker64 which should be more robust and faster. Fixes #214. --- packages/termux-tools/build.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/termux-tools/build.sh b/packages/termux-tools/build.sh index a44d77cfe..05096dd22 100644 --- a/packages/termux-tools/build.sh +++ b/packages/termux-tools/build.sh @@ -1,6 +1,6 @@ TERMUX_PKG_HOMEPAGE=http://termux.com/ TERMUX_PKG_DESCRIPTION="Some tools for Termux" -TERMUX_PKG_VERSION=0.25 +TERMUX_PKG_VERSION=0.26 termux_step_make_install () { $CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner @@ -12,10 +12,8 @@ termux_step_make_install () { echo '#!/bin/sh' > $WRAPPER_FILE # Some of these tools (am,dalvikvm,?) requires LD_LIBRARY_PATH setup on at least some devices: - if [ $tool != getprop ]; then - echo 'if [ -n "`getprop ro.product.cpu.abilist64`" ]; then BITS=64; else BITS=; fi' >> $WRAPPER_FILE - echo -n 'LD_LIBRARY_PATH=/system/lib$BITS ' >> $WRAPPER_FILE - fi + echo 'if [ -f /system/bin/linker64 ]; then BITS=64; else BITS=; fi' >> $WRAPPER_FILE + echo -n 'LD_LIBRARY_PATH=/system/lib$BITS ' >> $WRAPPER_FILE # Some tools require having /system/bin/app_process in the PATH, # at least am&pm on a Nexus 6p running Android 6.0: