gnatcoll-core: fix build on x86_64-darwin

This commit is contained in:
Weijia Wang 2023-05-08 20:17:26 +03:00
parent 7026085169
commit 0acb5e2466

View file

@ -6,3 +6,16 @@ addAdaObjectsPath() {
}
addEnvHooks "$targetOffset" addAdaObjectsPath
fixDarwinRpath() {
for f in $(find $out -type f -executable); do
install_name_tool -id $f $f || true
for rpath in $(otool -L $f | grep rpath | awk '{print $1}'); do
install_name_tool -change $rpath $out/lib/$(basename $rpath) $f || true
done
done
}
if [ "$(uname)" = "Darwin" ]; then
preFixupPhases+=" fixDarwinRpath"
fi