-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
Fix RPATH for libraries.
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
[[ ${target_platform} == "linux-64" ]] && targetsDir="targets/x86_64-linux" | ||
[[ ${target_platform} == "linux-ppc64le" ]] && targetsDir="targets/ppc64le-linux" | ||
[[ ${target_platform} == "linux-aarch64" ]] && targetsDir="targets/sbsa-linux" | ||
|
||
errors="" | ||
|
||
for lib in `find ${PREFIX}/${targetsDir}/lib -type f`; do | ||
[[ $lib =~ \.so ]] || continue | ||
|
||
rpath=$(patchelf --print-rpath $lib) | ||
echo "$lib rpath: $rpath" | ||
[[ $rpath == "\$ORIGIN" ]] || errors+="$lib\n" | ||
done | ||
|
||
if [[ $errors ]]; then | ||
echo "The following libraries were found with an unexpected RPATH:" | ||
echo -e "$errors" | ||
|
||
exit 1 | ||
else | ||
exit 0 | ||
fi |