diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-04-02 10:51:23 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-12-17 15:13:42 +0100 |
commit | 40bbbb6434d79f66bd494477739048b61a834a26 (patch) | |
tree | 96d4a609470bf25730b18a4f20ebb6744011e373 | |
parent | 0c9366028d24ae93d1b91bce5e812c621562f8e2 (diff) | |
download | ptxdist-40bbbb6434d79f66bd494477739048b61a834a26.tar.gz ptxdist-40bbbb6434d79f66bd494477739048b61a834a26.tar.xz |
install_copy_toolchain.sh: use PTXDIST_SYSROOT_TOOLCHAIN
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | scripts/install_copy_toolchain.sh | 46 | ||||
-rwxr-xr-x | scripts/make_locale.sh | 2 | ||||
-rwxr-xr-x | scripts/make_zoneinfo.sh | 2 |
3 files changed, 3 insertions, 47 deletions
diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh index 5b68f3eb4..1fda845b9 100755 --- a/scripts/install_copy_toolchain.sh +++ b/scripts/install_copy_toolchain.sh @@ -239,50 +239,6 @@ ptxd_install_toolchain_lib() { } -_ptxd_get_sysroot_usr_by_sysroot() { - local sysroot - - sysroot="$(ptxd_cross_cc_v | \ - sed -ne "/.*collect2.*/s,.*--sysroot=\([^[:space:]]*\).*,\1,p")" - - test -n "${sysroot}" || return 1 - - echo "$(ptxd_abspath ${sysroot}/usr)" -} - - -_ptxd_get_sysroot_usr_by_progname() { - local prog_name - - prog_name="$(ptxd_cross_cc -print-prog-name=gcc)" - case "${prog_name}" in - /*) - prog_name="$(ptxd_abspath ${prog_name%/bin/gcc})" - ;; - *) - if test "${NATIVE}" = "1"; then - prog_name="/usr" - else - return 1 - fi - ;; - esac - - echo "${prog_name}" -} - - -ptxd_get_sysroot_usr() { - local sysroot_usr - - sysroot_usr="$(_ptxd_get_sysroot_usr_by_sysroot)" || - sysroot_usr="$(_ptxd_get_sysroot_usr_by_progname)" || - ( echo "unable to identify your SYSROOT, giving up"; return $? ) - - echo "${sysroot_usr}" -} - - # # $@: # usr=<what to copy> @@ -295,7 +251,7 @@ ptxd_install_toolchain_usr() { eval "${@}" - sysroot_usr="$(ptxd_get_sysroot_usr)" || return $? + sysroot_usr="${PTXDIST_SYSROOT_TOOLCHAIN}/usr" if test -z "$(find ${sysroot_usr} -path "${sysroot_usr}/${usr}" -a \! -type d)"; then echo "file ${usr} not found" diff --git a/scripts/make_locale.sh b/scripts/make_locale.sh index bc1950e4d..9f741df52 100755 --- a/scripts/make_locale.sh +++ b/scripts/make_locale.sh @@ -63,7 +63,7 @@ add_locale() { usage fi - SYSROOT_USR=`ptxd_get_sysroot_usr` + SYSROOT_USR="${PTXDIST_SYSROOT_TOOLCHAIN}/usr" [ ! -d ${SYSROOT_USR} ] && { echo "Toolchain sysroot dir not found"; exit 1; } [ ! -d ${SYSROOT_USR}/share/i18n ] && { echo "I18NPATH source dir not found"; exit 1; } diff --git a/scripts/make_zoneinfo.sh b/scripts/make_zoneinfo.sh index c583aab40..6b77d60c6 100755 --- a/scripts/make_zoneinfo.sh +++ b/scripts/make_zoneinfo.sh @@ -39,7 +39,7 @@ add_zoneinfo() { esac done - [ -z ${SYSROOT_USR} ] && SYSROOT_USR=`ptxd_get_sysroot_usr` + [ -z ${SYSROOT_USR} ] && SYSROOT_USR="${PTXDIST_SYSROOT_TOOLCHAIN}/usr" [ ! -d ${SYSROOT_USR} ] && { echo "Toolchain sysroot dir (${SYSROOT_USR}) not found"; exit 1; } [ ! -d ${SYSROOT_USR}/share/zoneinfo ] && { echo "Zoneinfo dir (${SYSROOT_USR}) not found"; exit 1; } |