Skip to content

Commit

Permalink
Update the function install_cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 committed Dec 8, 2023
1 parent 90dc4bf commit 096b414
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions devel/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,15 @@ function install_cmake() {
rm -rf "${install_path}"
mkdir -p "${install_path}"
tar -zxvf "${CMAKE_PACKAGE_NAME}" --strip-components=1 -C "${install_path}"

local interpreter
interpreter="$(find "${DEVEL_HOME_PATH}/compiler" -name "${INTERPRETER}")"
local libc_so
libc_so="$(find "${DEVEL_HOME_PATH}/compiler" -name "${LIBC_SO}")"

patchelf --set-rpath "${DEVEL_HOME_PATH}/compiler/$(uname -m)-linux-gnu/lib:$(dirname "${libc_so}")" "${install_path}/bin"/*
patchelf --set-interpreter "${interpreter}" "${install_path}/bin"/*

setup_package "${package}"

log_info 'Success!'
Expand Down

0 comments on commit 096b414

Please sign in to comment.