Skip to content

Commit

Permalink
bootstrap.sh: Try to fix rvm install for arm64e (Apple Silicon Arm PAC)
Browse files Browse the repository at this point in the history
Also adding some machine architecture debug output
  • Loading branch information
trinitronx committed Feb 4, 2025
1 parent 1c05547 commit 70c7e09
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bootstrap-scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ function rvm_set_compile_opts() {
export LDSHARED="clang -bundle -Wl,-undefined,dynamic_lookup"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-shared"
fi
if [ "$machine" == "arm64" ]; then
export CFLAGS="${CFLAGS} -arch arm64e"
fi
if [[ "$RVM_COMPILE_OPTS_M1_LIBFFI" == "1" ]]; then
if [[ "$BREW_INSTALL_PKG_CONFIG" == "1" ]]; then
# Print all pkg-config variables in scriptable form with prefix: LIBFFI_
Expand Down Expand Up @@ -480,6 +483,13 @@ function debug_pkg_config_path() {
fi
}

function debug_apple_arch() {
printf "machine: "
machine
printf "cpu.features: "
sysctl machdep.cpu.features
}

function debug_ruby_bundler_cmds() {
type rvm | head -1
printf "ruby is: "
Expand All @@ -494,6 +504,8 @@ function rvm_debug_gems() {
check_trace_state
turn_trace_off
echo "======= DEBUG ============"
echo "------- CPU Arch ---------"
debug_apple_arch
echo "------- bootstrap.sh -----"
debug_ruby_bundler_cmds
(
Expand Down

0 comments on commit 70c7e09

Please sign in to comment.