File tree 2 files changed +18
-10
lines changed
2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,15 @@ RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed
190
190
RUN find /usr/local/rake-compiler/ruby -name lib*-ruby*.dll.a | while read f ; do n=`echo $f | sed s /.dll//` ; mv $f $n ; done
191
191
<% end %>
192
192
193
+ # ruby-2.5 links to libcrypt, which isn't necessary for extensions
194
+ RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
195
+
196
+ <% if platform =~/darwin/ %>
197
+ # ruby-3.2 on darwin links with `-bundle_loader`, see https://github.com/rake-compiler/rake-compiler-dock/issues/87
198
+ RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby/3.2.0 -name rbconfig.rb | \
199
+ while read f ; do sed -i 's/\["EXTDLDFLAGS"\] = "/&-Wl,-flat_namespace /' $f ; done
200
+ <% end %>
201
+
193
202
##
194
203
## Final adjustments
195
204
##
@@ -218,9 +227,6 @@ RUN echo "export PATH=\$DEVTOOLSET_ROOTPATH/usr/bin:\$PATH" >> /etc/rubybashrc
218
227
# Add prefixed versions of compiler tools
219
228
RUN for f in addr2line gcc gcov-tool ranlib ar dwp gcc-ranlib nm readelf as elfedit gcc-ar gprof objcopy size c++filt g++ gcov ld objdump strings cpp gcc-nm pkg-config strip ; do ln -sf $DEVTOOLSET_ROOTPATH/usr/bin/$f $DEVTOOLSET_ROOTPATH/usr/bin/<%= target %> -$f ; done
220
229
221
- # ruby-2.5 links to libcrypt, which isn't necessary for extensions
222
- RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
223
-
224
230
# Use builtin functions of newer gcc to avoid linker issues on Musl based Linux
225
231
COPY build/math_h.patch /root/
226
232
RUN cd /usr/include/ && \
Original file line number Diff line number Diff line change 79
79
##
80
80
## This returns us to the symbol resolution we had in previous Rubies. It feels gross but may
81
81
## be a workaround for gem maintainers until we all figure out a better way to deal with this.
82
- extdldflags = RbConfig ::MAKEFILE_CONFIG [ "EXTDLDFLAGS" ] . split
83
- if found = extdldflags . index ( "-bundle_loader" )
84
- removed_1 = extdldflags . delete_at ( found ) # flag
85
- removed_2 = extdldflags . delete_at ( found ) # and its argument
86
- puts "Removing '#{ removed_1 } #{ removed_2 } ' from EXTDLDFLAGS"
87
- end
88
- RbConfig ::MAKEFILE_CONFIG [ "EXTDLDFLAGS" ] = extdldflags . join ( " " )
82
+ #
83
+ # extdldflags = RbConfig::MAKEFILE_CONFIG["EXTDLDFLAGS"].split
84
+ # if found = extdldflags.index("-bundle_loader")
85
+ # removed_1 = extdldflags.delete_at(found) # flag
86
+ # removed_2 = extdldflags.delete_at(found) # and its argument
87
+ # puts "Removing '#{removed_1} #{removed_2}' from EXTDLDFLAGS"
88
+ # end
89
+ # RbConfig::MAKEFILE_CONFIG["EXTDLDFLAGS"] = extdldflags.join(" ")
90
+ #
89
91
end
90
92
end
91
93
You can’t perform that action at this time.
0 commit comments