Skip to content

Commit

Permalink
Fix apple silicon build problems Issue #294
Browse files Browse the repository at this point in the history
- find gnu-getopt when installed by homebrew in /opt
- invoke realpath only on known path components
  (needed for some realpath implementation(s))
  (relevant when build-flavor directory does not yet exist)
  • Loading branch information
Howard Bussey authored and pkoning2 committed Oct 10, 2023
1 parent 90e4597 commit 8ee2b90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/cmake-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ cmakeSFlag=
## MacOS workaround: MacOS has an older getopt installed in /usr/bin, brew
## has an updated version that installs in a custom place.
[[ -d /usr/local/opt/gnu-getopt/bin ]] && PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
[[ -d /opt/homebrew/opt/gnu-getopt/bin ]] && PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"
[[ -d /usr/local/opt/coreutils/libexec/gnubin ]] && PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

getopt_prog=
Expand Down Expand Up @@ -292,7 +293,7 @@ if [[ "x${simhTopDir}" = x ]]; then
echo "Did this really happen?"
exit 1
else
buildSubdir=$(${realpath} "${simhTopDir}/cmake/${buildSubdir}")
buildSubdir=$(${realpath} "${simhTopDir}/cmake/")"/${buildSubdir}"
echo "${scriptName}: SIMH top-evel directory: ${simhTopDir}"
echo "${scriptName}: Build directory: ${buildSubdir}"
fi
Expand Down

0 comments on commit 8ee2b90

Please sign in to comment.