Skip to content

Commit

Permalink
(PA-4717) Support building ruby 3.2 on 32-bit Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper committed Feb 9, 2023
1 parent ad6683b commit 3e7d50b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions configs/components/ruby-3.2.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@
# cygwin opensshd & bash. So mkmf will convert compiler paths, e.g. -IC:/... to
# cygwin paths, -I/cygdrive/c/..., which confuses mingw-w64. So specify the build
# target explicitly.
special_flags += " CPPFLAGS='-DFD_SETSIZE=2048' debugflags=-g --build x86_64-w64-mingw32 "
special_flags += " CPPFLAGS='-DFD_SETSIZE=2048' debugflags=-g "

if platform.architecture == "x64"
special_flags += " --build x86_64-w64-mingw32 "
else
special_flags += " --build i686-w64-mingw32 "
end
end

without_dtrace = [
Expand Down Expand Up @@ -221,7 +227,11 @@
rbconfig_changes["LDFLAGS"] = "-L. -Wl,-rpath=/opt/puppetlabs/puppet/lib -fstack-protector -rdynamic -Wl,-export-dynamic -L/opt/puppetlabs/puppet/lib"
end
elsif platform.is_windows?
rbconfig_changes["CC"] = "x86_64-w64-mingw32-gcc"
if platform.architecture == "x64"
rbconfig_changes["CC"] = "x86_64-w64-mingw32-gcc"
else
rbconfig_changes["CC"] = "i686-w64-mingw32-gcc"
end
end

pkg.add_source("file://resources/files/ruby_vendor_gems/operating_system.rb")
Expand Down

0 comments on commit 3e7d50b

Please sign in to comment.