git: 8ecef12113ad - stable/14 - sys: Build arm64 per-thread SSP with GCC

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 15 Jul 2024 12:38:29 UTC
The branch stable/14 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=8ecef12113ad61e25a7c56e8c77cb6754fa1060c

commit 8ecef12113ad61e25a7c56e8c77cb6754fa1060c
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2024-05-22 08:20:01 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-07-15 12:27:54 +0000

    sys: Build arm64 per-thread SSP with GCC
    
    It has been supported since GCC 9. It is unlikely anything older than
    that will build the kernel so mark it as supported by GCC.
    
    Reviewed by:    brooks, jhb
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D45267
    
    (cherry picked from commit c2628accc029a07eb8ff73b6df7f7d6af194ca2d)
---
 sys/conf/Makefile.arm64 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64
index 77c36fa6ce6c..5e706549486a 100644
--- a/sys/conf/Makefile.arm64
+++ b/sys/conf/Makefile.arm64
@@ -31,7 +31,8 @@ CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\"
 
 PERTHREAD_SSP_ENABLED!=	grep PERTHREAD_SSP opt_global.h || true ; echo
 .if !empty(PERTHREAD_SSP_ENABLED)
-. if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000
+. if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000) || \
+  ${COMPILER_TYPE} == "gcc"
 ARM64_SSP_CFLAGS = -mstack-protector-guard=sysreg
 ARM64_SSP_CFLAGS += -mstack-protector-guard-reg=sp_el0
 ARM64_SSP_CFLAGS += -mstack-protector-guard-offset=0