[Buildroot] [PATCH v8 2/3] support/scripts/fix-rpath: check if the patchelf utilitiy is executable

Wolfgang Grandegger wg at grandegger.com
Fri Jul 21 13:03:02 UTC 2017


Signed-off-by: Wolfgang Grandegger <wg at grandegger.com>
---
 support/scripts/fix-rpath | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/support/scripts/fix-rpath b/support/scripts/fix-rpath
index f7c70b7..8fa5048 100755
--- a/support/scripts/fix-rpath
+++ b/support/scripts/fix-rpath
@@ -45,6 +45,9 @@ Environment:
 
     TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR
                  (default HOST_DIR/opt/ext-toolchain)
+
+Returns:         0 if success or 1 in case of error
+
 EOF
 }
 
@@ -60,6 +63,11 @@ main() {
     local find_args=( )
     local sanitize_extra_args=( )
 
+    if [ ! -x "${PATCHELF}" ]; then
+	echo "Error: patchelf utility '${PATCHELF}' not found"
+	exit 1;
+    fi
+
     case "${tree}" in
         host)
             rootdir="${HOST_DIR}"
-- 
2.7.4




More information about the buildroot mailing list