Skip to content

Commit f170aed

Browse files
Merge #6889: backport: bitcoin#28461: build: Windows SSP roundup
f8d4a48 Merge bitcoin#28461: build: Windows SSP roundup (fanquake) Pull request description: ## Issue being fixed or feature implemented Fixes undeterminism for windows build ## What was done? Original backport description: f95af98 guix: default ssp for Windows GCC (fanquake) 95d55b9 guix: remove ssp workaround from Windows GCC (fanquake) 8f43302 build: remove explicit libssp linking from Windows build (fanquake) I was expecting this to fail to compile somewhere, maybe in the CI, but that doesn't seem to be the case? Seems workable given the SSP related changes in the newer mingw-w64 headers (which are in Guix): > Implement some of the stack protector functions/variables so -lssp is now optional when _FORTIFY_SOURCE or -fstack-protector-strong is used. However I think this would still be broken in some older environments, so we might have to wait for a compiler bump, or similar. The optional -lssp also seems to work when using older headers, which doesn't make sense. ## How Has This Been Tested? Run multiple guix build - hashes matched ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK f8d4a48 kwvg: utACK f8d4a48 thephez: utACK f8d4a48 Tree-SHA512: c36789942ee2693b0c0b8a57abf5a82212959e52a275dfc979598785f5dfb16427073afc433fd538aac4f6ab43fe0f50dde021faae697e9dca802be8b119f878
2 parents 07518ff + f8d4a48 commit f170aed

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

configure.ac

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,12 +1119,6 @@ if test "$use_hardening" != "no"; then
11191119
AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR])
11201120
AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR])
11211121
AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
1122-
1123-
case $host in
1124-
*mingw*)
1125-
AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])])
1126-
;;
1127-
esac
11281122
fi
11291123

11301124
dnl These flags are specific to ld64, and may cause issues with other linkers.

contrib/guix/manifest.scm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,8 @@ inspecting signatures in Mach-O binaries.")
431431
`(append ,flags
432432
;; https://gcc.gnu.org/install/configure.html
433433
(list "--enable-threads=posix",
434-
building-on)))
435-
((#:make-flags flags)
436-
;; Uses the SSP functions from glibc instead of from libssp.so.
437-
;; Our 'symbol-check' script will complain if we link against libssp.so,
438-
;; and thus will ensure that this works properly.
439-
`(cons "gcc_cv_libc_provides_ssp=yes" ,flags))))))
434+
"--enable-default-ssp=yes",
435+
building-on)))))))
440436

441437
(define-public linux-base-gcc
442438
(package

0 commit comments

Comments
 (0)