diff options
author | Alexey Neyman <stilor@att.net> | 2017-02-27 22:16:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 22:16:59 (GMT) |
commit | 1ec5e7aa3400b534264ba1c2fa3949dc6a2cca90 (patch) | |
tree | 67bf8ce9fc7b7558d39a26a0958399a3f0640baa /scripts/xldd.in | |
parent | 85ae00c1a6331d7738abb406a1eb59091c8a4535 (diff) | |
parent | b3c23b7fdb62f396d47f46d8e3908725570d4acd (diff) |
Merge pull request #618 from stilor/revert-sed-require-gnu-sed
Require GNU sed on macos
Diffstat (limited to 'scripts/xldd.in')
-rw-r--r-- | scripts/xldd.in | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/xldd.in b/scripts/xldd.in index cea0394..0e8c0d0 100644 --- a/scripts/xldd.in +++ b/scripts/xldd.in @@ -5,7 +5,6 @@ export LC_ALL=C version="@@CT_VERSION@@" bits="@@CT_BITS@@" sed="${SED:-@@CT_sed@@}" -sed_r="${SED_R:-@@CT_sed_r@@}" grep="${GREP:-@@CT_grep@@}" my_name="$( basename "${0}" )" @@ -160,7 +159,7 @@ fi sysroot="$( "${gcc}" -print-sysroot 2>/dev/null )" if [ -z "${sysroot}" ]; then sysroot="$( "${gcc}" -print-file-name=libc.so 2>/dev/null \ - |${sed_r} -e 's:/usr/lib/libc.so$::;' \ + |${sed} -r -e 's:/usr/lib/libc.so$::;' \ )" fi if [ -z "${sysroot}" ]; then @@ -258,9 +257,9 @@ do_process_file() { do_trace "Parsing file '%s'\n" "${file}" save_search_rpath=( "${search_rpath[@]}" ) - for n in $( ${readelf} -d "${file}" \ - |${grep} -E '\((RPATH|RUNPATH)\)' \ - |${sed_r} -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\ + for n in $( "${readelf}" -d "${file}" \ + |"${grep}" -E '\((RPATH|RUNPATH)\)' \ + |"${sed}" -r -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\ ); do do_trace "-> adding rpath '%s'\n" "${n}" search_rpath+=( "${n}" ) @@ -271,9 +270,9 @@ do_process_file() { done do_trace ": end search path\n" - for n in $( ${readelf} -d "${file}" \ - |${grep} -E '\(NEEDED\)' \ - |${sed_r} -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \ + for n in $( "${readelf}" -d "${file}" \ + |"${grep}" -E '\(NEEDED\)' \ + |"${sed}" -r -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \ ); do found=0 for m in "${needed_list[@]}"; do |