From 5fef2b715fdb69697161b21585c118995b6ee399 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Sat, 9 Nov 2019 00:16:34 -0600 Subject: [PATCH] Windows update extconf.rb (#2069) for use with ssp and varied Ruby/MSYS2 combinations --- History.md | 1 + ext/puma_http11/extconf.rb | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index ec0adbbf..6cfb0659 100644 --- a/History.md +++ b/History.md @@ -5,6 +5,7 @@ * Bugfixes * Your bugfix goes here (#Github Number) + * Windows update extconf.rb for use with ssp and varied Ruby/MSYS2 combinations (#2069) ## 4.3.0 / 2019-11-07 diff --git a/ext/puma_http11/extconf.rb b/ext/puma_http11/extconf.rb index a0edd839..a00e4f4d 100644 --- a/ext/puma_http11/extconf.rb +++ b/ext/puma_http11/extconf.rb @@ -1,9 +1,10 @@ require 'mkmf' dir_config("puma_http11") -if RUBY_PLATFORM[/mingw32/] - append_cflags '-D_FORTIFY_SOURCE=2' - append_ldflags '-fstack-protector' + +if $mingw + append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2' + append_ldflags '-fstack-protector-strong -l:libssp.a' have_library 'ssp' end