commit ba7b30a920172233392fd9dc176631c3da25d5f0 Author: Nicolas Vigier boklm@torproject.org Date: Fri May 25 18:53:40 2018 +0200
Bug 25860: Clean up OpenSSL's configure options for Windows
Avoid duplicating Windows CFLAGS and LDFLAGS. Instead, use the flags defined in rbm.conf.
This also means we are now using -fstack-protector-strong instead of -fstack-protector-all for building openssl.
We update the CFLAGS/LDFLAGS defined in rbm.conf to move var/flag_mwindows at the end, because openssl's Configure script does not like having an argument starting with a space. --- projects/openssl/config | 3 ++- rbm.conf | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/projects/openssl/config b/projects/openssl/config index 9c191fa..3489d42 100644 --- a/projects/openssl/config +++ b/projects/openssl/config @@ -15,7 +15,8 @@ targets: configure_opts: -shared linux-generic32 windows: var: - configure_opts: '-shared --cross-compile-prefix=[% c("arch") %]-w64-mingw32- mingw[% IF c("var/windows-x86_64") %]64[% END %] "-fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -Wl,--no-insert-timestamp -lssp -L$gcclibs"' + flag_mwindows: '' + configure_opts: '-shared --cross-compile-prefix=[% c("arch") %]-w64-mingw32- mingw[% IF c("var/windows-x86_64") %]64[% END %] "[% c("var/CFLAGS") %] [% c("var/LDFLAGS") %]"' osx-x86_64: var: configure_opts: --cross-compile-prefix=x86_64-apple-darwin10- darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 diff --git a/rbm.conf b/rbm.conf index 0d6de69..19bee8e 100644 --- a/rbm.conf +++ b/rbm.conf @@ -216,8 +216,8 @@ targets: container: suite: jessie configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"' - CFLAGS: '[% c("var/flag_mwindows") %] -fstack-protector-strong -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security' - LDFLAGS: '[% c("var/flag_mwindows") %] -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -Wl,--no-insert-timestamp -lssp -L$gcclibs' + CFLAGS: '-fstack-protector-strong -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security [% c("var/flag_mwindows") %]' + LDFLAGS: '-Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -Wl,--no-insert-timestamp -lssp -L$gcclibs [% c("var/flag_mwindows") %]' flag_mwindows: '-mwindows' compiler: mingw-w64 deps:
tor-commits@lists.torproject.org