Skip to content

Commit ea32090

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge bitcoin#28461: build: Windows SSP roundup
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) Pull request description: 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. Would fix bitcoin#28104. ACKs for top commit: hebasto: ACK f95af98, I've verified binaries from `bitcoin-f95af98128f1-win64.zip` on Windows 11 Pro 23H2. TheCharlatan: ACK f95af98 Tree-SHA512: 71169ec513cfe692dfa7741d2bf37b45da05627c0af1cbd50cf8c3c04cc21c4bf88f3284532bddc1e3e648391ec78dbaca5170987a13c21ac204a7bcaf27f349
1 parent e71c422 commit ea32090

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
@@ -1010,12 +1010,6 @@ if test "$use_hardening" != "no"; then
10101010
AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR])
10111011
AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR])
10121012
AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
1013-
1014-
case $host in
1015-
*mingw*)
1016-
AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])])
1017-
;;
1018-
esac
10191013
fi
10201014

10211015
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
@@ -427,12 +427,8 @@ inspecting signatures in Mach-O binaries.")
427427
`(append ,flags
428428
;; https://gcc.gnu.org/install/configure.html
429429
(list "--enable-threads=posix",
430-
building-on)))
431-
((#:make-flags flags)
432-
;; Uses the SSP functions from glibc instead of from libssp.so.
433-
;; Our 'symbol-check' script will complain if we link against libssp.so,
434-
;; and thus will ensure that this works properly.
435-
`(cons "gcc_cv_libc_provides_ssp=yes" ,flags))))))
430+
"--enable-default-ssp=yes",
431+
building-on)))))))
436432

437433
(define-public linux-base-gcc
438434
(package

0 commit comments

Comments
 (0)