Skip to content

Commit

Permalink
Set default MAKE=make on FreeBSD (#2263)
Browse files Browse the repository at this point in the history
This was set to gmake in #1381
as a workaround for https://bugs.ruby-lang.org/issues/16331

YJIT builds in Ruby 3.3 previews require the use of BSD make on these
platforms, and no supported version of MRI requires the use of gmake, so
revert this.

JRuby continues to require gmake for jruby-launcher.

Fixes #2262

Co-authored-by: Mislav Marohnić <[email protected]>
  • Loading branch information
Freaky and mislav authored Oct 11, 2023
1 parent 51071a4 commit 4cec390
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
8 changes: 2 additions & 6 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -1357,12 +1357,8 @@ if [ -n "$noexec" ]; then
fi

if [ -z "$MAKE" ]; then
if is_freebsd; then
# Workaround for Ruby bug 16331: https://bugs.ruby-lang.org/issues/16331
# Due to this bug, build will fail with FreeBSD's make after #1368
# The bug is already fixed in upstream but GNU make is still required
# when building older releases of Ruby. Use GNU make rather than switching
# depending of Ruby version.
if is_freebsd && [[ $1 == jruby-* ]]; then
# jruby-launcher requires gmake: https://github.com/ruby/ruby/pull/8591
export MAKE="gmake"
else
export MAKE="make"
Expand Down
13 changes: 0 additions & 13 deletions test/build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -404,19 +404,6 @@ OUT
assert [ -x ./here/bin/package ]
}

@test "make on FreeBSD defaults to gmake" {
cached_tarball "ruby-2.0.0"

stub_repeated uname "-s : echo FreeBSD"
MAKE=gmake stub_make_install

MAKE= install_fixture definitions/vanilla-ruby
assert_success

unstub gmake
unstub uname
}

@test "can use RUBY_CONFIGURE to apply a patch" {
cached_tarball "ruby-2.0.0"

Expand Down

0 comments on commit 4cec390

Please sign in to comment.