From 4214b6255108066e176109e7fa474b6c85d9bfea Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 1 Jul 2015 09:54:27 +0000 Subject: [PATCH] Set sysroot for arm build --- atom.gyp | 4 +- filenames.gypi | 1 - toolchain.gypi | 27 +++++++++ tools/linux/sysroot_ld_path.sh | 100 +++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 4 deletions(-) create mode 100755 tools/linux/sysroot_ld_path.sh diff --git a/atom.gyp b/atom.gyp index 423c59e8..cce72f16 100644 --- a/atom.gyp +++ b/atom.gyp @@ -5,8 +5,6 @@ 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', 'version%': '0.28.3', - - 'atom_source_root': '/dev/null 2>&1 ; then + for inc_file in $root$included_files; do + process_ld_so_conf "$root" "$inc_file" + done + fi + else + if ls $(pwd)/$included_files >/dev/null 2>&1 ; then + for inc_file in $(pwd)/$included_files; do + process_ld_so_conf "$root" "$inc_file" + done + fi + fi + continue + fi + + echo "$ENTRY" | grep -qs ^/ + if [ $? -eq 0 ]; then + process_entry "$root" "$ENTRY" + fi + done + + # popd is a bashism + cd "$saved_pwd" +} + +# Main + +if [ $# -ne 1 ]; then + echo Usage $0 /abspath/to/sysroot + exit 1 +fi + +echo $1 | grep -qs ' ' +if [ $? -eq 0 ]; then + log_error_and_exit $1 contains whitespace. +fi + +LD_SO_CONF="$1/etc/ld.so.conf" +LD_SO_CONF_D="$1/etc/ld.so.conf.d" + +if [ -e "$LD_SO_CONF" ]; then + process_ld_so_conf "$1" "$LD_SO_CONF" | xargs echo +elif [ -e "$LD_SO_CONF_D" ]; then + find "$LD_SO_CONF_D" -maxdepth 1 -name '*.conf' -print -quit > /dev/null + if [ $? -eq 0 ]; then + for entry in $LD_SO_CONF_D/*.conf; do + process_ld_so_conf "$1" "$entry" + done | xargs echo + fi +fi -- 2.43.0