2023-05-29 16:47:58 +00:00
|
|
|
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
|
2020-08-21 10:18:02 +00:00
|
|
|
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
|
|
|
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
2023-05-29 16:47:58 +00:00
|
|
|
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
|
2023-05-15 08:15:31 +00:00
|
|
|
link to it unconditionally, as otherwise we get link failures if some objects
|
|
|
|
are -fstack-protector built and final link happens with -fno-stack-protector.
|
2020-08-21 10:18:02 +00:00
|
|
|
This seems to be the common case when bootstrapping gcc, the piepatches do
|
2023-05-15 08:15:31 +00:00
|
|
|
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
2020-08-21 10:18:02 +00:00
|
|
|
stack-protector flag usage.
|
|
|
|
|
|
|
|
---
|
2022-08-13 15:17:36 +00:00
|
|
|
gcc/gcc.cc | 3 +--
|
2020-08-21 10:18:02 +00:00
|
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
|
2022-08-13 15:17:36 +00:00
|
|
|
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
2023-05-15 08:15:31 +00:00
|
|
|
index b5a6f200635..6cbb726599b 100644
|
2022-08-13 15:17:36 +00:00
|
|
|
--- a/gcc/gcc.cc
|
|
|
|
+++ b/gcc/gcc.cc
|
2023-05-15 08:15:31 +00:00
|
|
|
@@ -991,8 +991,7 @@ proper position among the other output files. */
|
2020-08-21 10:18:02 +00:00
|
|
|
|
|
|
|
#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 "-lssp_nonshared"
|
|
|
|
#else
|
|
|
|
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
|
|
|
"|fstack-protector-strong|fstack-protector-explicit" \
|
2023-05-15 08:15:31 +00:00
|
|
|
--
|
|
|
|
2.40.1
|
|
|
|
|