From 8f43302a0a1bb79129933e4cc174bf8d8d59ec15 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 12 Sep 2023 14:38:06 +0100 Subject: [PATCH 1/3] build: remove explicit libssp linking from Windows build --- configure.ac | 6 ------ 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6add570d00f..147a5146863 100644 --- a/configure.ac +++ b/configure.ac @@ -988,12 +988,6 @@ if test "$use_hardening" != "no"; then AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR]) AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR]) AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR]) - - case $host in - *mingw*) - AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])]) - ;; - esac fi dnl These flags are specific to ld64, and may cause issues with other linkers. From 95d55b96c2cfd2a0d5a246d4a9eff9d0744ba223 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 12 Sep 2023 13:04:51 +0100 Subject: [PATCH 2/3] guix: remove ssp workaround from Windows GCC --- contrib/guix/manifest.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index ceb178155de..038f918d945 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -461,12 +461,7 @@ inspecting signatures in Mach-O binaries.") `(append ,flags ;; https://gcc.gnu.org/install/configure.html (list "--enable-threads=posix", - building-on))) - ((#:make-flags flags) - ;; Uses the SSP functions from glibc instead of from libssp.so. - ;; Our 'symbol-check' script will complain if we link against libssp.so, - ;; and thus will ensure that this works properly. - `(cons "gcc_cv_libc_provides_ssp=yes" ,flags)))))) + building-on))))))) (define-public linux-base-gcc (package From f95af98128f17002bf137a48441167020f3ef9bb Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 12 Sep 2023 14:39:20 +0100 Subject: [PATCH 3/3] guix: default ssp for Windows GCC --- contrib/guix/manifest.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 038f918d945..3795e6d049f 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -461,6 +461,7 @@ inspecting signatures in Mach-O binaries.") `(append ,flags ;; https://gcc.gnu.org/install/configure.html (list "--enable-threads=posix", + "--enable-default-ssp=yes", building-on))))))) (define-public linux-base-gcc