@@ -93,7 +93,9 @@ RUN bash -c " \
9393 rbenv shell \$v && \
9494 gem install rake-compiler -v1.2.9 && \
9595 cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
96- patch -p1 < /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; \
96+ for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
97+ patch -p1 < \$patch ; \
98+ done \
9799 done \
98100 "
99101
@@ -112,19 +114,19 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
112114#
113115xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
114116 [
115- # Rubyinstaller-3.1.0 + is platform x64-mingw-ucrt
116- [ "3.4.1:3.3.5:3.2.0 :3.1.0 " , "3.1.6" ] ,
117+ # Rubyinstaller-3.1+ is platform x64-mingw-ucrt
118+ [ "3.4.1:3.3.5:3.2.6 :3.1.6 " , "3.1.6" ] ,
117119 ]
118120elsif platform =~ /x64-mingw32/
119121 [
120- # Rubyinstaller prior to 3.1.0 is platform x64-mingw32
121- [ "2.6.0 :2.5.0 :2.4.0 " , "2.5.9" ] ,
122- [ "3.0.0 :2.7.0 " , "3.1.6" ] ,
122+ # Rubyinstaller prior to 3.1 is platform x64-mingw32
123+ [ "2.6.10 :2.5.9 :2.4.10 " , "2.5.9" ] ,
124+ [ "3.0.7 :2.7.8 " , "3.1.6" ] ,
123125 ]
124126else
125127 [
126- [ "2.6.0 :2.5.0 :2.4.0 " , "2.5.9" ] ,
127- [ "3.4.1:3.3.5:3.2.0 :3.1.0 :3.0.0 :2.7.0 " , "3.1.6" ] ,
128+ [ "2.6.10 :2.5.9 :2.4.10 " , "2.5.9" ] ,
129+ [ "3.4.1:3.3.5:3.2.6 :3.1.6 :3.0.7 :2.7.8 " , "3.1.6" ] ,
128130 ]
129131end
130132
@@ -167,12 +169,15 @@ RUN find /usr/local/rake-compiler/ruby -name lib*-ruby*.dll.a | while read f ; d
167169RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
168170
169171<% if platform =~ /darwin/ %>
170- # ruby-3.2+ on darwin links with `-bundle_loader`,
171- # - see https://github.com/rake-compiler/rake-compiler-dock/issues/87
172- # - note that we do this for "3.[2-9].*" to match rubies 3.2 and later
173- # - and we use a "*" on the end instead of a digit to match prereleases like "3.3.0+0"
174- RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby/3.[2-9].* -name rbconfig.rb | \
175- while read f ; do sed -i 's/\["EXTDLDFLAGS"\] = "/&-Wl,-flat_namespace /' $f ; done
172+ # for rubies which use `-bundle_loader` on darwin
173+ # - the upstream change: https://github.com/ruby/ruby/pull/6193
174+ # - how we got to this solution: https://github.com/rake-compiler/rake-compiler-dock/issues/87
175+ #
176+ # note that ruby/ruby#6193 was backported to 2.7.7, 3.0.5, and 3.1.3
177+ # - see https://github.com/rake-compiler/rake-compiler-dock/issues/134 for more notes
178+ RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby -name rbconfig.rb | while read f ; do \
179+ sed -E -i 's/(\["EXTDLDFLAGS"\] = ".*)(-bundle_loader)/\1-Wl,-flat_namespace \2/' $f ; \
180+ done
176181<% end %>
177182
178183
@@ -220,6 +225,6 @@ COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
220225
221226RUN bash -c "rbenv global 3.1.6"
222227
223- ENV RUBY_CC_VERSION=3.4.1:3.3.5:3.2.0 :3.1.0 :3.0.0 :2.7.0 :2.6.0 :2.5.0 :2.4.0
228+ ENV RUBY_CC_VERSION=3.4.1:3.3.5:3.2.6 :3.1.6 :3.0.7 :2.7.8 :2.6.10 :2.5.9 :2.4.10
224229
225230CMD bash
0 commit comments