summaryrefslogtreecommitdiff
path: root/Ports/ruby
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-06-16 02:33:48 -0600
committerLinus Groh <mail@linusgroh.de>2022-06-30 12:29:18 +0100
commit6d4cfba596891a5be75358beda232c3c2238c259 (patch)
tree49cfcb2c50a40e7d0ee500829b93fedacde3b3bb /Ports/ruby
parent809852aeb17fdf1c75e74d46ea5685cacf478126 (diff)
downloadserenity-6d4cfba596891a5be75358beda232c3c2238c259.zip
Ports/ruby: Pass proper --with-coroutine flag per architecture
This fixes the x86_64 build. However, when built with clang x86_64, ruby crashes on exit trying to free some memory that has an invalid header magic. More work to be done here to make the x86_64 build work properly.
Diffstat (limited to 'Ports/ruby')
-rwxr-xr-xPorts/ruby/package.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/Ports/ruby/package.sh b/Ports/ruby/package.sh
index 8662622ee2..58ee779743 100755
--- a/Ports/ruby/package.sh
+++ b/Ports/ruby/package.sh
@@ -18,7 +18,21 @@ launcher_command="/usr/local/bin/ruby /usr/local/bin/irb --legacy"
launcher_run_in_terminal="true"
icon_file="../ruby-kit/ruby.png"
-configopts=("--with-coroutine=x86" "--disable-install-doc")
+configopts=(
+ "--disable-install-doc"
+)
+
+case "${SERENITY_ARCH}" in
+ x86_64)
+ configopts+=("--with-coroutine=amd64")
+ ;;
+ i686)
+ configopts+=("--with-coroutine=x86")
+ ;;
+ *)
+ echo "Error: Architecture ${SERENITY_ARCH} is not supported for this port"
+ exit 1
+esac
export CFLAGS="-DNGROUPS_MAX=65536"