LINK_SSP_SPEC is defined as

"%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit:}"

when TARGET_LIBC_PROVIDES_SSP is defined.  Define it as "" which has the
same effect.

PR driver/125233
* gcc.cc (LINK_SSP_SPEC): Defined as "" if TARGET_LIBC_PROVIDES_SSP
is defined.


-- 
H.J.
From 65ce8d603165b6a318f56091f857fceff2cc6a68 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Sat, 9 May 2026 05:11:48 +0800
Subject: [PATCH] Define empty LINK_SSP_SPEC for TARGET_LIBC_PROVIDES_SSP

LINK_SSP_SPEC is defined as

"%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit:}"

when TARGET_LIBC_PROVIDES_SSP is defined.  Define it as "" which has the
same effect.

	PR driver/125233
	* gcc.cc (LINK_SSP_SPEC): Defined as "" if TARGET_LIBC_PROVIDES_SSP
	is defined.

Signed-off-by: H.J. Lu <[email protected]>
---
 gcc/gcc.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 43b0158ee02..2277becbd43 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1019,8 +1019,7 @@ proper position among the other output files.  */
 
 #ifndef LINK_SSP_SPEC
 #ifdef TARGET_LIBC_PROVIDES_SSP
-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-		       "|fstack-protector-strong|fstack-protector-explicit:}"
+#define LINK_SSP_SPEC ""
 #else
 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
 		       "|fstack-protector-strong|fstack-protector-explicit" \
-- 
2.54.0

Reply via email to