Skip to content

Commit ad6683b

Browse files
committed
(PA-4717) Install libssp-0.dll on Windows
Ruby's configure script enables `--stack-protector-strong` on toolchains that support it. We're currently using mingw-w64-gcc 5.2.0 on Windows which adds a runtime dependency to libssp-0.dll when building ruby.exe: $ objdump -p ruby.exe | grep 'DLL Name' DLL Name: x64-msvcrt-ruby320.dll DLL Name: KERNEL32.dll DLL Name: msvcrt.dll DLL Name: libssp-0.dll So we need to install this dependency as well. Note newer versions of msys2 and mingw-w64-gcc no longer add the libssp-0 dependency to programs built with stack protection, so eventually we can remove it, see msys2/MINGW-packages#13401 https://www.msys2.org/news/#2022-10-10-libssp-is-no-longer-required
1 parent 55d0c6f commit ad6683b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

configs/components/ruby-3.2.0.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@
171171
"mv #{ruby_bindir}/#{name}.cmd #{ruby_bindir}/#{name}.bat"
172172
end
173173
end
174+
175+
# Required when using `stack-protection-strong` and older versions of mingw-w64-gcc
176+
pkg.install_file File.join(settings[:gcc_bindir], "libssp-0.dll"), File.join(settings[:bindir], "libssp-0.dll")
174177
end
175178

176179
target_doubles = {

0 commit comments

Comments
 (0)